Documentation ¶
Index ¶
- Constants
- Variables
- type AppConfig
- func (appConf *AppConfig) AddMember(userUuid string)
- func (appConf *AppConfig) ApplyBtnTime(btnDefs ...BtnDef)
- func (appConf *AppConfig) ApplyCampaign(records ...Record)
- func (appConf *AppConfig) ApplyFunnel(stages ...Stage) error
- func (appConfig AppConfig) HasRead(userUuid string, userOrgn string) error
- func (appConfig AppConfig) HasReadOrWrite(userUuid string, userOrgn string) error
- func (appConfig AppConfig) HasReadWrite(userUuid string) error
- type AppconfigRepo
- type BtnDef
- type Record
- type Stage
Constants ¶
View Source
const ( FlagFunnel = "funnel" FlagCampaign = "campaign" FlagBtnTime = "btntime" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct { AppUuid string `bson:"_id"` ConfigOwner string `bson:"config_owner"` OwnerOrgn string `bson:"owner_orgn"` IsPrivate bool `bson:"is_private"` Member []string `bson:"member"` Locked bool `bson:"locked"` Funnel []Stage `bson:"funnel"` Campaign []Record `bson:"campaign"` BtnTime []BtnDef `bson:"btntime"` }
func NewDefault ¶
NewDefault creates a new AppConfig with only meta data
func (*AppConfig) AddMember ¶
AddMember appends the member list of an AppConfig. Skips operation if already exists
func (*AppConfig) ApplyBtnTime ¶
func (*AppConfig) ApplyCampaign ¶
func (*AppConfig) ApplyFunnel ¶
func (AppConfig) HasReadOrWrite ¶
HasReadOrWrite checks if the user has either read or write acces on the AppToken
func (AppConfig) HasReadWrite ¶
HasReadWrite checks if the provided user uuid is listed as owner of AppToken
type AppconfigRepo ¶
type AppconfigRepo interface { Initialize(ctx context.Context, appConfig AppConfig) error GetById(ctx context.Context, uuid string, result interface{}) error UpdateByFlag(ctx context.Context, uuid, flag string, data interface{}) error AddMember(ctx context.Context, uuid, userUuid string) error RollbackAddMember(ctx context.Context, uuid, userUuid string) error SetAppConfigLock(ctx context.Context, uuid string, lock bool) error }
Click to show internal directories.
Click to hide internal directories.