This commit is contained in:
Пётр Крутов
2022-08-11 08:09:54 +00:00
parent c95208ee97
commit 68d24d41c4
308 changed files with 15470 additions and 85 deletions

6
opts/decort_opts.go Normal file
View File

@@ -0,0 +1,6 @@
package opts
type DecortOpts struct {
Type string
Value string
}

26
opts/opts.go Normal file
View File

@@ -0,0 +1,26 @@
package opts
import "github.com/rudecs/decort-sdk/typed"
type Opts struct {
IsAdmin bool
AdminValue string
}
func New(options []DecortOpts) *Opts {
if len(options) == 0 {
return nil
}
option := &Opts{}
for _, v := range options {
if v.Type == typed.TypeAdmin {
option.IsAdmin = true
option.AdminValue = v.Value
}
}
return option
}