Merge pull request #428 from openziti/reserved_metadata_fix

sdk fixes to re-instate reserved share metadata (#427)
This commit is contained in:
Michael Quigley 2023-10-25 14:31:10 -04:00 committed by GitHub
commit 94d17abee6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -87,6 +87,7 @@ func (cmd *reserveCommand) run(_ *cobra.Command, args []string) {
}
req := &sdk.ShareRequest{
Reserved: true,
BackendMode: sdk.BackendMode(cmd.backendMode),
ShareMode: shareMode,
BasicAuth: cmd.basicAuth,

View File

@ -20,6 +20,7 @@ const (
)
type ShareRequest struct {
Reserved bool
BackendMode BackendMode
ShareMode ShareMode
Target string

View File

@ -25,6 +25,7 @@ func CreateShare(root env_core.Root, request *ShareRequest) (*Share, error) {
default:
return nil, errors.Errorf("unknown share mode '%v'", request.ShareMode)
}
out.Body.Reserved = request.Reserved
if len(request.BasicAuth) > 0 {
out.Body.AuthScheme = string(Basic)