mirror of
https://github.com/openziti/zrok.git
synced 2024-11-25 01:23:49 +01:00
29 lines
536 B
Go
29 lines
536 B
Go
|
package sdk
|
||
|
|
||
|
import (
|
||
|
"github.com/pkg/errors"
|
||
|
)
|
||
|
|
||
|
type Share struct {
|
||
|
Token string
|
||
|
}
|
||
|
|
||
|
func NewShare(request *ShareRequest) (*Share, error) {
|
||
|
switch request.ShareMode {
|
||
|
case PrivateShareMode:
|
||
|
return newPrivateShare(request)
|
||
|
case PublicShareMode:
|
||
|
return newPublicShare(request)
|
||
|
default:
|
||
|
return nil, errors.Errorf("unknown share mode '%v'", request.ShareMode)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func newPrivateShare(request *ShareRequest) (*Share, error) {
|
||
|
return nil, nil
|
||
|
}
|
||
|
|
||
|
func newPublicShare(request *ShareRequest) (*Share, error) {
|
||
|
return nil, nil
|
||
|
}
|