diff --git a/server/automation/automation/apigw_body_handler.gen.go b/server/automation/automation/apigw_body_handler.gen.go index 758c1b1d7..713323baa 100644 --- a/server/automation/automation/apigw_body_handler.gen.go +++ b/server/automation/automation/apigw_body_handler.gen.go @@ -45,10 +45,9 @@ type ( // Read function Read request body from integration gateway // // expects implementation of read function: -// -// func (h apigwBodyHandler) read(ctx context.Context, args *apigwBodyReadArgs) (results *apigwBodyReadResults, err error) { -// return -// } +// func (h apigwBodyHandler) read(ctx context.Context, args *apigwBodyReadArgs) (results *apigwBodyReadResults, err error) { +// return +// } func (h apigwBodyHandler) Read() *atypes.Function { return &atypes.Function{ Ref: "apigwBodyRead", diff --git a/server/automation/automation/corredor_handler.gen.go b/server/automation/automation/corredor_handler.gen.go index ee3b55d45..bbb39e316 100644 --- a/server/automation/automation/corredor_handler.gen.go +++ b/server/automation/automation/corredor_handler.gen.go @@ -10,6 +10,7 @@ package automation import ( "context" + atypes "github.com/cortezaproject/corteza/server/automation/types" "github.com/cortezaproject/corteza/server/pkg/expr" "github.com/cortezaproject/corteza/server/pkg/wfexec" @@ -47,10 +48,9 @@ type ( // Exec function Corredor automation script executor // // expects implementation of exec function: -// -// func (h corredorHandler) exec(ctx context.Context, args *corredorExecArgs) (results *corredorExecResults, err error) { -// return -// } +// func (h corredorHandler) exec(ctx context.Context, args *corredorExecArgs) (results *corredorExecResults, err error) { +// return +// } func (h corredorHandler) Exec() *atypes.Function { return &atypes.Function{ Ref: "corredorExec", diff --git a/server/automation/automation/email_handler.gen.go b/server/automation/automation/email_handler.gen.go index 7d8baeb11..3b9409ce4 100644 --- a/server/automation/automation/email_handler.gen.go +++ b/server/automation/automation/email_handler.gen.go @@ -113,10 +113,9 @@ func (a emailSendArgs) GetPlain() (bool, string, io.Reader) { // Send function Email // // expects implementation of send function: -// -// func (h emailHandler) send(ctx context.Context, args *emailSendArgs) (err error) { -// return -// } +// func (h emailHandler) send(ctx context.Context, args *emailSendArgs) (err error) { +// return +// } func (h emailHandler) Send() *atypes.Function { return &atypes.Function{ Ref: "emailSend", @@ -358,10 +357,9 @@ func (a emailMessageArgs) GetPlain() (bool, string, io.Reader) { // Message function Email builder // // expects implementation of message function: -// -// func (h emailHandler) message(ctx context.Context, args *emailMessageArgs) (results *emailMessageResults, err error) { -// return -// } +// func (h emailHandler) message(ctx context.Context, args *emailMessageArgs) (results *emailMessageResults, err error) { +// return +// } func (h emailHandler) Message() *atypes.Function { return &atypes.Function{ Ref: "emailMessage", @@ -565,10 +563,9 @@ type ( // SendMessage function Email sender // // expects implementation of sendMessage function: -// -// func (h emailHandler) sendMessage(ctx context.Context, args *emailSendMessageArgs) (err error) { -// return -// } +// func (h emailHandler) sendMessage(ctx context.Context, args *emailSendMessageArgs) (err error) { +// return +// } func (h emailHandler) SendMessage() *atypes.Function { return &atypes.Function{ Ref: "emailSendMessage", @@ -618,10 +615,9 @@ type ( // SetSubject function Email subject // // expects implementation of setSubject function: -// -// func (h emailHandler) setSubject(ctx context.Context, args *emailSetSubjectArgs) (err error) { -// return -// } +// func (h emailHandler) setSubject(ctx context.Context, args *emailSetSubjectArgs) (err error) { +// return +// } func (h emailHandler) SetSubject() *atypes.Function { return &atypes.Function{ Ref: "emailSetSubject", @@ -679,10 +675,9 @@ type ( // SetHeaders function Email headers // // expects implementation of setHeaders function: -// -// func (h emailHandler) setHeaders(ctx context.Context, args *emailSetHeadersArgs) (err error) { -// return -// } +// func (h emailHandler) setHeaders(ctx context.Context, args *emailSetHeadersArgs) (err error) { +// return +// } func (h emailHandler) SetHeaders() *atypes.Function { return &atypes.Function{ Ref: "emailSetHeaders", @@ -743,10 +738,9 @@ type ( // SetHeader function Email header // // expects implementation of setHeader function: -// -// func (h emailHandler) setHeader(ctx context.Context, args *emailSetHeaderArgs) (err error) { -// return -// } +// func (h emailHandler) setHeader(ctx context.Context, args *emailSetHeaderArgs) (err error) { +// return +// } func (h emailHandler) SetHeader() *atypes.Function { return &atypes.Function{ Ref: "emailSetHeader", @@ -819,10 +813,9 @@ type ( // SetAddress function Email set address // // expects implementation of setAddress function: -// -// func (h emailHandler) setAddress(ctx context.Context, args *emailSetAddressArgs) (err error) { -// return -// } +// func (h emailHandler) setAddress(ctx context.Context, args *emailSetAddressArgs) (err error) { +// return +// } func (h emailHandler) SetAddress() *atypes.Function { return &atypes.Function{ Ref: "emailSetAddress", @@ -903,10 +896,9 @@ type ( // AddAddress function Email add address // // expects implementation of addAddress function: -// -// func (h emailHandler) addAddress(ctx context.Context, args *emailAddAddressArgs) (err error) { -// return -// } +// func (h emailHandler) addAddress(ctx context.Context, args *emailAddAddressArgs) (err error) { +// return +// } func (h emailHandler) AddAddress() *atypes.Function { return &atypes.Function{ Ref: "emailAddAddress", @@ -990,10 +982,9 @@ func (a emailAttachArgs) GetContent() (bool, io.Reader, string) { // Attach function Email attachment // // expects implementation of attach function: -// -// func (h emailHandler) attach(ctx context.Context, args *emailAttachArgs) (err error) { -// return -// } +// func (h emailHandler) attach(ctx context.Context, args *emailAttachArgs) (err error) { +// return +// } func (h emailHandler) Attach() *atypes.Function { return &atypes.Function{ Ref: "emailAttach", @@ -1073,10 +1064,9 @@ type ( // Embed function Email embedded attachment // // expects implementation of embed function: -// -// func (h emailHandler) embed(ctx context.Context, args *emailEmbedArgs) (err error) { -// return -// } +// func (h emailHandler) embed(ctx context.Context, args *emailEmbedArgs) (err error) { +// return +// } func (h emailHandler) Embed() *atypes.Function { return &atypes.Function{ Ref: "emailEmbed", diff --git a/server/automation/automation/http_request_handler.gen.go b/server/automation/automation/http_request_handler.gen.go index 4e2faeb1c..7cb4dc969 100644 --- a/server/automation/automation/http_request_handler.gen.go +++ b/server/automation/automation/http_request_handler.gen.go @@ -93,10 +93,9 @@ func (a httpRequestSendArgs) GetBody() (bool, string, io.Reader, interface{}) { // Send function HTTP request // // expects implementation of send function: -// -// func (h httpRequestHandler) send(ctx context.Context, args *httpRequestSendArgs) (results *httpRequestSendResults, err error) { -// return -// } +// func (h httpRequestHandler) send(ctx context.Context, args *httpRequestSendArgs) (results *httpRequestSendResults, err error) { +// return +// } func (h httpRequestHandler) Send() *atypes.Function { return &atypes.Function{ Ref: "httpRequestSend", diff --git a/server/automation/automation/jsenv_handler.gen.go b/server/automation/automation/jsenv_handler.gen.go index 256bd54d0..5ca321a0a 100644 --- a/server/automation/automation/jsenv_handler.gen.go +++ b/server/automation/automation/jsenv_handler.gen.go @@ -57,10 +57,9 @@ func (a jsenvExecuteArgs) GetScope() (bool, interface{}, io.Reader) { // Execute function Process arbitrary data in jsenv // // expects implementation of execute function: -// -// func (h jsenvHandler) execute(ctx context.Context, args *jsenvExecuteArgs) (results *jsenvExecuteResults, err error) { -// return -// } +// func (h jsenvHandler) execute(ctx context.Context, args *jsenvExecuteArgs) (results *jsenvExecuteResults, err error) { +// return +// } func (h jsenvHandler) Execute() *atypes.Function { return &atypes.Function{ Ref: "jsenvExecute", diff --git a/server/automation/automation/jwt_handler.gen.go b/server/automation/automation/jwt_handler.gen.go index 0038073fa..472a66b6f 100644 --- a/server/automation/automation/jwt_handler.gen.go +++ b/server/automation/automation/jwt_handler.gen.go @@ -72,10 +72,9 @@ func (a jwtGenerateArgs) GetSecret() (bool, string, io.Reader) { // Generate function Generate JWT // // expects implementation of generate function: -// -// func (h jwtHandler) generate(ctx context.Context, args *jwtGenerateArgs) (results *jwtGenerateResults, err error) { -// return -// } +// func (h jwtHandler) generate(ctx context.Context, args *jwtGenerateArgs) (results *jwtGenerateResults, err error) { +// return +// } func (h jwtHandler) Generate() *atypes.Function { return &atypes.Function{ Ref: "jwtGenerate", diff --git a/server/automation/automation/log_handler.gen.go b/server/automation/automation/log_handler.gen.go index 95b5cb3a8..4c200e698 100644 --- a/server/automation/automation/log_handler.gen.go +++ b/server/automation/automation/log_handler.gen.go @@ -46,10 +46,9 @@ type ( // Debug function Log debug message // // expects implementation of debug function: -// -// func (h logHandler) debug(ctx context.Context, args *logDebugArgs) (err error) { -// return -// } +// func (h logHandler) debug(ctx context.Context, args *logDebugArgs) (err error) { +// return +// } func (h logHandler) Debug() *atypes.Function { return &atypes.Function{ Ref: "logDebug", @@ -100,10 +99,9 @@ type ( // Info function Log info message // // expects implementation of info function: -// -// func (h logHandler) info(ctx context.Context, args *logInfoArgs) (err error) { -// return -// } +// func (h logHandler) info(ctx context.Context, args *logInfoArgs) (err error) { +// return +// } func (h logHandler) Info() *atypes.Function { return &atypes.Function{ Ref: "logInfo", @@ -154,10 +152,9 @@ type ( // Warn function Log warning message // // expects implementation of warn function: -// -// func (h logHandler) warn(ctx context.Context, args *logWarnArgs) (err error) { -// return -// } +// func (h logHandler) warn(ctx context.Context, args *logWarnArgs) (err error) { +// return +// } func (h logHandler) Warn() *atypes.Function { return &atypes.Function{ Ref: "logWarn", @@ -208,10 +205,9 @@ type ( // Error function Log error message // // expects implementation of error function: -// -// func (h logHandler) error(ctx context.Context, args *logErrorArgs) (err error) { -// return -// } +// func (h logHandler) error(ctx context.Context, args *logErrorArgs) (err error) { +// return +// } func (h logHandler) Error() *atypes.Function { return &atypes.Function{ Ref: "logError", diff --git a/server/automation/automation/loop_handler.gen.go b/server/automation/automation/loop_handler.gen.go index 7e1018624..4757c1c9d 100644 --- a/server/automation/automation/loop_handler.gen.go +++ b/server/automation/automation/loop_handler.gen.go @@ -56,10 +56,9 @@ type ( // Sequence function Iterates over sequence of numbers // // expects implementation of sequence function: -// -// func (h loopHandler) sequence(ctx context.Context, args *loopSequenceArgs) (results *loopSequenceResults, err error) { -// return -// } +// func (h loopHandler) sequence(ctx context.Context, args *loopSequenceArgs) (results *loopSequenceResults, err error) { +// return +// } func (h loopHandler) Sequence() *atypes.Function { return &atypes.Function{ Ref: "loopSequence", @@ -130,10 +129,9 @@ type ( // Do function Condition // // expects implementation of do function: -// -// func (h loopHandler) do(ctx context.Context, args *loopDoArgs) (err error) { -// return -// } +// func (h loopHandler) do(ctx context.Context, args *loopDoArgs) (err error) { +// return +// } func (h loopHandler) Do() *atypes.Function { return &atypes.Function{ Ref: "loopDo", @@ -185,10 +183,9 @@ type ( // Each function Items // // expects implementation of each function: -// -// func (h loopHandler) each(ctx context.Context, args *loopEachArgs) (results *loopEachResults, err error) { -// return -// } +// func (h loopHandler) each(ctx context.Context, args *loopEachArgs) (results *loopEachResults, err error) { +// return +// } func (h loopHandler) Each() *atypes.Function { return &atypes.Function{ Ref: "loopEach", @@ -244,10 +241,9 @@ type ( // Lines function Stream lines // // expects implementation of lines function: -// -// func (h loopHandler) lines(ctx context.Context, args *loopLinesArgs) (results *loopLinesResults, err error) { -// return -// } +// func (h loopHandler) lines(ctx context.Context, args *loopLinesArgs) (results *loopLinesResults, err error) { +// return +// } func (h loopHandler) Lines() *atypes.Function { return &atypes.Function{ Ref: "loopLines", diff --git a/server/automation/automation/oauth2_handler.gen.go b/server/automation/automation/oauth2_handler.gen.go index ea7981264..d113d8281 100644 --- a/server/automation/automation/oauth2_handler.gen.go +++ b/server/automation/automation/oauth2_handler.gen.go @@ -55,10 +55,9 @@ type ( // Authenticate function Authentication: OAUTH2 // // expects implementation of authenticate function: -// -// func (h oauth2Handler) authenticate(ctx context.Context, args *oauth2AuthenticateArgs) (results *oauth2AuthenticateResults, err error) { -// return -// } +// func (h oauth2Handler) authenticate(ctx context.Context, args *oauth2AuthenticateArgs) (results *oauth2AuthenticateResults, err error) { +// return +// } func (h oauth2Handler) Authenticate() *atypes.Function { return &atypes.Function{ Ref: "oauth2Authenticate", diff --git a/server/automation/automation/queue_handler.gen.go b/server/automation/automation/queue_handler.gen.go index 4afc435bf..4fdc3fd05 100644 --- a/server/automation/automation/queue_handler.gen.go +++ b/server/automation/automation/queue_handler.gen.go @@ -50,10 +50,9 @@ func (a queueWriteArgs) GetPayload() (bool, string, io.Reader) { // Write function Queue message send // // expects implementation of write function: -// -// func (h queueHandler) write(ctx context.Context, args *queueWriteArgs) (err error) { -// return -// } +// func (h queueHandler) write(ctx context.Context, args *queueWriteArgs) (err error) { +// return +// } func (h queueHandler) Write() *atypes.Function { return &atypes.Function{ Ref: "queueWrite", diff --git a/server/automation/service/access_control_actions.gen.go b/server/automation/service/access_control_actions.gen.go index 7d4682640..468fe8279 100644 --- a/server/automation/service/access_control_actions.gen.go +++ b/server/automation/service/access_control_actions.gen.go @@ -52,6 +52,7 @@ var ( // setRule updates accessControlActionProps's rule // // This function is auto-generated. +// func (p *accessControlActionProps) setRule(rule *rbac.Rule) *accessControlActionProps { p.rule = rule return p @@ -60,6 +61,7 @@ func (p *accessControlActionProps) setRule(rule *rbac.Rule) *accessControlAction // Serialize converts accessControlActionProps to actionlog.Meta // // This function is auto-generated. +// func (p accessControlActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -78,6 +80,7 @@ func (p accessControlActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p accessControlActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -126,6 +129,7 @@ func (p accessControlActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *accessControlAction) String() string { var props = &accessControlActionProps{} @@ -153,6 +157,7 @@ func (e *accessControlAction) ToAction() *actionlog.Action { // AccessControlActionGrant returns "automation:access_control.grant" action // // This function is auto-generated. +// func AccessControlActionGrant(props ...*accessControlActionProps) *accessControlAction { a := &accessControlAction{ timestamp: time.Now(), @@ -175,7 +180,9 @@ func AccessControlActionGrant(props ...*accessControlActionProps) *accessControl // AccessControlErrGeneric returns "automation:access_control.generic" as *errors.Error // +// // This function is auto-generated. +// func AccessControlErrGeneric(mm ...*accessControlActionProps) *errors.Error { var p = &accessControlActionProps{} if len(mm) > 0 { @@ -209,7 +216,9 @@ func AccessControlErrGeneric(mm ...*accessControlActionProps) *errors.Error { // AccessControlErrNotAllowedToSetPermissions returns "automation:access_control.notAllowedToSetPermissions" as *errors.Error // +// // This function is auto-generated. +// func AccessControlErrNotAllowedToSetPermissions(mm ...*accessControlActionProps) *errors.Error { var p = &accessControlActionProps{} if len(mm) > 0 { @@ -247,6 +256,7 @@ func AccessControlErrNotAllowedToSetPermissions(mm ...*accessControlActionProps) // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc accessControl) recordAction(ctx context.Context, props *accessControlActionProps, actionFn func(...*accessControlActionProps) *accessControlAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/automation/service/session_actions.gen.go b/server/automation/service/session_actions.gen.go index 0b77939f9..5125273ef 100644 --- a/server/automation/service/session_actions.gen.go +++ b/server/automation/service/session_actions.gen.go @@ -55,6 +55,7 @@ var ( // setSession updates sessionActionProps's session // // This function is auto-generated. +// func (p *sessionActionProps) setSession(session *types.Session) *sessionActionProps { p.session = session return p @@ -63,6 +64,7 @@ func (p *sessionActionProps) setSession(session *types.Session) *sessionActionPr // setNew updates sessionActionProps's new // // This function is auto-generated. +// func (p *sessionActionProps) setNew(new *types.Session) *sessionActionProps { p.new = new return p @@ -71,6 +73,7 @@ func (p *sessionActionProps) setNew(new *types.Session) *sessionActionProps { // setUpdate updates sessionActionProps's update // // This function is auto-generated. +// func (p *sessionActionProps) setUpdate(update *types.Session) *sessionActionProps { p.update = update return p @@ -79,6 +82,7 @@ func (p *sessionActionProps) setUpdate(update *types.Session) *sessionActionProp // setFilter updates sessionActionProps's filter // // This function is auto-generated. +// func (p *sessionActionProps) setFilter(filter *types.SessionFilter) *sessionActionProps { p.filter = filter return p @@ -87,6 +91,7 @@ func (p *sessionActionProps) setFilter(filter *types.SessionFilter) *sessionActi // Serialize converts sessionActionProps to actionlog.Meta // // This function is auto-generated. +// func (p sessionActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -110,6 +115,7 @@ func (p sessionActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p sessionActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -185,6 +191,7 @@ func (p sessionActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *sessionAction) String() string { var props = &sessionActionProps{} @@ -212,6 +219,7 @@ func (e *sessionAction) ToAction() *actionlog.Action { // SessionActionSearch returns "automation:session.search" action // // This function is auto-generated. +// func SessionActionSearch(props ...*sessionActionProps) *sessionAction { a := &sessionAction{ timestamp: time.Now(), @@ -231,6 +239,7 @@ func SessionActionSearch(props ...*sessionActionProps) *sessionAction { // SessionActionLookup returns "automation:session.lookup" action // // This function is auto-generated. +// func SessionActionLookup(props ...*sessionActionProps) *sessionAction { a := &sessionAction{ timestamp: time.Now(), @@ -250,6 +259,7 @@ func SessionActionLookup(props ...*sessionActionProps) *sessionAction { // SessionActionCreate returns "automation:session.create" action // // This function is auto-generated. +// func SessionActionCreate(props ...*sessionActionProps) *sessionAction { a := &sessionAction{ timestamp: time.Now(), @@ -269,6 +279,7 @@ func SessionActionCreate(props ...*sessionActionProps) *sessionAction { // SessionActionUpdate returns "automation:session.update" action // // This function is auto-generated. +// func SessionActionUpdate(props ...*sessionActionProps) *sessionAction { a := &sessionAction{ timestamp: time.Now(), @@ -288,6 +299,7 @@ func SessionActionUpdate(props ...*sessionActionProps) *sessionAction { // SessionActionDelete returns "automation:session.delete" action // // This function is auto-generated. +// func SessionActionDelete(props ...*sessionActionProps) *sessionAction { a := &sessionAction{ timestamp: time.Now(), @@ -307,6 +319,7 @@ func SessionActionDelete(props ...*sessionActionProps) *sessionAction { // SessionActionUndelete returns "automation:session.undelete" action // // This function is auto-generated. +// func SessionActionUndelete(props ...*sessionActionProps) *sessionAction { a := &sessionAction{ timestamp: time.Now(), @@ -329,7 +342,9 @@ func SessionActionUndelete(props ...*sessionActionProps) *sessionAction { // SessionErrGeneric returns "automation:session.generic" as *errors.Error // +// // This function is auto-generated. +// func SessionErrGeneric(mm ...*sessionActionProps) *errors.Error { var p = &sessionActionProps{} if len(mm) > 0 { @@ -363,7 +378,9 @@ func SessionErrGeneric(mm ...*sessionActionProps) *errors.Error { // SessionErrNotFound returns "automation:session.notFound" as *errors.Error // +// // This function is auto-generated. +// func SessionErrNotFound(mm ...*sessionActionProps) *errors.Error { var p = &sessionActionProps{} if len(mm) > 0 { @@ -395,7 +412,9 @@ func SessionErrNotFound(mm ...*sessionActionProps) *errors.Error { // SessionErrInvalidID returns "automation:session.invalidID" as *errors.Error // +// // This function is auto-generated. +// func SessionErrInvalidID(mm ...*sessionActionProps) *errors.Error { var p = &sessionActionProps{} if len(mm) > 0 { @@ -427,7 +446,9 @@ func SessionErrInvalidID(mm ...*sessionActionProps) *errors.Error { // SessionErrStaleData returns "automation:session.staleData" as *errors.Error // +// // This function is auto-generated. +// func SessionErrStaleData(mm ...*sessionActionProps) *errors.Error { var p = &sessionActionProps{} if len(mm) > 0 { @@ -459,7 +480,9 @@ func SessionErrStaleData(mm ...*sessionActionProps) *errors.Error { // SessionErrNotAllowedToRead returns "automation:session.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func SessionErrNotAllowedToRead(mm ...*sessionActionProps) *errors.Error { var p = &sessionActionProps{} if len(mm) > 0 { @@ -493,7 +516,9 @@ func SessionErrNotAllowedToRead(mm ...*sessionActionProps) *errors.Error { // SessionErrNotAllowedToSearch returns "automation:session.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func SessionErrNotAllowedToSearch(mm ...*sessionActionProps) *errors.Error { var p = &sessionActionProps{} if len(mm) > 0 { @@ -527,7 +552,9 @@ func SessionErrNotAllowedToSearch(mm ...*sessionActionProps) *errors.Error { // SessionErrNotAllowedToDelete returns "automation:session.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func SessionErrNotAllowedToDelete(mm ...*sessionActionProps) *errors.Error { var p = &sessionActionProps{} if len(mm) > 0 { @@ -561,7 +588,9 @@ func SessionErrNotAllowedToDelete(mm ...*sessionActionProps) *errors.Error { // SessionErrNotAllowedToManage returns "automation:session.notAllowedToManage" as *errors.Error // +// // This function is auto-generated. +// func SessionErrNotAllowedToManage(mm ...*sessionActionProps) *errors.Error { var p = &sessionActionProps{} if len(mm) > 0 { @@ -601,6 +630,7 @@ func SessionErrNotAllowedToManage(mm ...*sessionActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc session) recordAction(ctx context.Context, props *sessionActionProps, actionFn func(...*sessionActionProps) *sessionAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/automation/service/trigger_actions.gen.go b/server/automation/service/trigger_actions.gen.go index bd7192a07..bcdcb101d 100644 --- a/server/automation/service/trigger_actions.gen.go +++ b/server/automation/service/trigger_actions.gen.go @@ -55,6 +55,7 @@ var ( // setTrigger updates triggerActionProps's trigger // // This function is auto-generated. +// func (p *triggerActionProps) setTrigger(trigger *types.Trigger) *triggerActionProps { p.trigger = trigger return p @@ -63,6 +64,7 @@ func (p *triggerActionProps) setTrigger(trigger *types.Trigger) *triggerActionPr // setNew updates triggerActionProps's new // // This function is auto-generated. +// func (p *triggerActionProps) setNew(new *types.Trigger) *triggerActionProps { p.new = new return p @@ -71,6 +73,7 @@ func (p *triggerActionProps) setNew(new *types.Trigger) *triggerActionProps { // setUpdate updates triggerActionProps's update // // This function is auto-generated. +// func (p *triggerActionProps) setUpdate(update *types.Trigger) *triggerActionProps { p.update = update return p @@ -79,6 +82,7 @@ func (p *triggerActionProps) setUpdate(update *types.Trigger) *triggerActionProp // setFilter updates triggerActionProps's filter // // This function is auto-generated. +// func (p *triggerActionProps) setFilter(filter *types.TriggerFilter) *triggerActionProps { p.filter = filter return p @@ -87,6 +91,7 @@ func (p *triggerActionProps) setFilter(filter *types.TriggerFilter) *triggerActi // Serialize converts triggerActionProps to actionlog.Meta // // This function is auto-generated. +// func (p triggerActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -110,6 +115,7 @@ func (p triggerActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p triggerActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -185,6 +191,7 @@ func (p triggerActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *triggerAction) String() string { var props = &triggerActionProps{} @@ -212,6 +219,7 @@ func (e *triggerAction) ToAction() *actionlog.Action { // TriggerActionSearch returns "automation:trigger.search" action // // This function is auto-generated. +// func TriggerActionSearch(props ...*triggerActionProps) *triggerAction { a := &triggerAction{ timestamp: time.Now(), @@ -231,6 +239,7 @@ func TriggerActionSearch(props ...*triggerActionProps) *triggerAction { // TriggerActionLookup returns "automation:trigger.lookup" action // // This function is auto-generated. +// func TriggerActionLookup(props ...*triggerActionProps) *triggerAction { a := &triggerAction{ timestamp: time.Now(), @@ -250,6 +259,7 @@ func TriggerActionLookup(props ...*triggerActionProps) *triggerAction { // TriggerActionCreate returns "automation:trigger.create" action // // This function is auto-generated. +// func TriggerActionCreate(props ...*triggerActionProps) *triggerAction { a := &triggerAction{ timestamp: time.Now(), @@ -269,6 +279,7 @@ func TriggerActionCreate(props ...*triggerActionProps) *triggerAction { // TriggerActionUpdate returns "automation:trigger.update" action // // This function is auto-generated. +// func TriggerActionUpdate(props ...*triggerActionProps) *triggerAction { a := &triggerAction{ timestamp: time.Now(), @@ -288,6 +299,7 @@ func TriggerActionUpdate(props ...*triggerActionProps) *triggerAction { // TriggerActionDelete returns "automation:trigger.delete" action // // This function is auto-generated. +// func TriggerActionDelete(props ...*triggerActionProps) *triggerAction { a := &triggerAction{ timestamp: time.Now(), @@ -307,6 +319,7 @@ func TriggerActionDelete(props ...*triggerActionProps) *triggerAction { // TriggerActionUndelete returns "automation:trigger.undelete" action // // This function is auto-generated. +// func TriggerActionUndelete(props ...*triggerActionProps) *triggerAction { a := &triggerAction{ timestamp: time.Now(), @@ -329,7 +342,9 @@ func TriggerActionUndelete(props ...*triggerActionProps) *triggerAction { // TriggerErrGeneric returns "automation:trigger.generic" as *errors.Error // +// // This function is auto-generated. +// func TriggerErrGeneric(mm ...*triggerActionProps) *errors.Error { var p = &triggerActionProps{} if len(mm) > 0 { @@ -363,7 +378,9 @@ func TriggerErrGeneric(mm ...*triggerActionProps) *errors.Error { // TriggerErrNotFound returns "automation:trigger.notFound" as *errors.Error // +// // This function is auto-generated. +// func TriggerErrNotFound(mm ...*triggerActionProps) *errors.Error { var p = &triggerActionProps{} if len(mm) > 0 { @@ -395,7 +412,9 @@ func TriggerErrNotFound(mm ...*triggerActionProps) *errors.Error { // TriggerErrInvalidID returns "automation:trigger.invalidID" as *errors.Error // +// // This function is auto-generated. +// func TriggerErrInvalidID(mm ...*triggerActionProps) *errors.Error { var p = &triggerActionProps{} if len(mm) > 0 { @@ -427,7 +446,9 @@ func TriggerErrInvalidID(mm ...*triggerActionProps) *errors.Error { // TriggerErrStaleData returns "automation:trigger.staleData" as *errors.Error // +// // This function is auto-generated. +// func TriggerErrStaleData(mm ...*triggerActionProps) *errors.Error { var p = &triggerActionProps{} if len(mm) > 0 { @@ -459,7 +480,9 @@ func TriggerErrStaleData(mm ...*triggerActionProps) *errors.Error { // TriggerErrNotAllowedToRead returns "automation:trigger.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func TriggerErrNotAllowedToRead(mm ...*triggerActionProps) *errors.Error { var p = &triggerActionProps{} if len(mm) > 0 { @@ -493,7 +516,9 @@ func TriggerErrNotAllowedToRead(mm ...*triggerActionProps) *errors.Error { // TriggerErrNotAllowedToSearch returns "automation:trigger.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func TriggerErrNotAllowedToSearch(mm ...*triggerActionProps) *errors.Error { var p = &triggerActionProps{} if len(mm) > 0 { @@ -527,7 +552,9 @@ func TriggerErrNotAllowedToSearch(mm ...*triggerActionProps) *errors.Error { // TriggerErrNotAllowedToCreate returns "automation:trigger.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func TriggerErrNotAllowedToCreate(mm ...*triggerActionProps) *errors.Error { var p = &triggerActionProps{} if len(mm) > 0 { @@ -561,7 +588,9 @@ func TriggerErrNotAllowedToCreate(mm ...*triggerActionProps) *errors.Error { // TriggerErrNotAllowedToUpdate returns "automation:trigger.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func TriggerErrNotAllowedToUpdate(mm ...*triggerActionProps) *errors.Error { var p = &triggerActionProps{} if len(mm) > 0 { @@ -595,7 +624,9 @@ func TriggerErrNotAllowedToUpdate(mm ...*triggerActionProps) *errors.Error { // TriggerErrNotAllowedToDelete returns "automation:trigger.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func TriggerErrNotAllowedToDelete(mm ...*triggerActionProps) *errors.Error { var p = &triggerActionProps{} if len(mm) > 0 { @@ -629,7 +660,9 @@ func TriggerErrNotAllowedToDelete(mm ...*triggerActionProps) *errors.Error { // TriggerErrNotAllowedToUndelete returns "automation:trigger.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func TriggerErrNotAllowedToUndelete(mm ...*triggerActionProps) *errors.Error { var p = &triggerActionProps{} if len(mm) > 0 { @@ -669,6 +702,7 @@ func TriggerErrNotAllowedToUndelete(mm ...*triggerActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc trigger) recordAction(ctx context.Context, props *triggerActionProps, actionFn func(...*triggerActionProps) *triggerAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/automation/service/workflow_actions.gen.go b/server/automation/service/workflow_actions.gen.go index cbe8aa3a8..5e41cdb02 100644 --- a/server/automation/service/workflow_actions.gen.go +++ b/server/automation/service/workflow_actions.gen.go @@ -56,6 +56,7 @@ var ( // setWorkflow updates workflowActionProps's workflow // // This function is auto-generated. +// func (p *workflowActionProps) setWorkflow(workflow *types.Workflow) *workflowActionProps { p.workflow = workflow return p @@ -64,6 +65,7 @@ func (p *workflowActionProps) setWorkflow(workflow *types.Workflow) *workflowAct // setNew updates workflowActionProps's new // // This function is auto-generated. +// func (p *workflowActionProps) setNew(new *types.Workflow) *workflowActionProps { p.new = new return p @@ -72,6 +74,7 @@ func (p *workflowActionProps) setNew(new *types.Workflow) *workflowActionProps { // setUpdate updates workflowActionProps's update // // This function is auto-generated. +// func (p *workflowActionProps) setUpdate(update *types.Workflow) *workflowActionProps { p.update = update return p @@ -80,6 +83,7 @@ func (p *workflowActionProps) setUpdate(update *types.Workflow) *workflowActionP // setTrigger updates workflowActionProps's trigger // // This function is auto-generated. +// func (p *workflowActionProps) setTrigger(trigger *types.Trigger) *workflowActionProps { p.trigger = trigger return p @@ -88,6 +92,7 @@ func (p *workflowActionProps) setTrigger(trigger *types.Trigger) *workflowAction // setFilter updates workflowActionProps's filter // // This function is auto-generated. +// func (p *workflowActionProps) setFilter(filter *types.WorkflowFilter) *workflowActionProps { p.filter = filter return p @@ -96,6 +101,7 @@ func (p *workflowActionProps) setFilter(filter *types.WorkflowFilter) *workflowA // Serialize converts workflowActionProps to actionlog.Meta // // This function is auto-generated. +// func (p workflowActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -128,6 +134,7 @@ func (p workflowActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p workflowActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -227,6 +234,7 @@ func (p workflowActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *workflowAction) String() string { var props = &workflowActionProps{} @@ -254,6 +262,7 @@ func (e *workflowAction) ToAction() *actionlog.Action { // WorkflowActionSearch returns "automation:workflow.search" action // // This function is auto-generated. +// func WorkflowActionSearch(props ...*workflowActionProps) *workflowAction { a := &workflowAction{ timestamp: time.Now(), @@ -273,6 +282,7 @@ func WorkflowActionSearch(props ...*workflowActionProps) *workflowAction { // WorkflowActionLookup returns "automation:workflow.lookup" action // // This function is auto-generated. +// func WorkflowActionLookup(props ...*workflowActionProps) *workflowAction { a := &workflowAction{ timestamp: time.Now(), @@ -292,6 +302,7 @@ func WorkflowActionLookup(props ...*workflowActionProps) *workflowAction { // WorkflowActionCreate returns "automation:workflow.create" action // // This function is auto-generated. +// func WorkflowActionCreate(props ...*workflowActionProps) *workflowAction { a := &workflowAction{ timestamp: time.Now(), @@ -311,6 +322,7 @@ func WorkflowActionCreate(props ...*workflowActionProps) *workflowAction { // WorkflowActionUpdate returns "automation:workflow.update" action // // This function is auto-generated. +// func WorkflowActionUpdate(props ...*workflowActionProps) *workflowAction { a := &workflowAction{ timestamp: time.Now(), @@ -330,6 +342,7 @@ func WorkflowActionUpdate(props ...*workflowActionProps) *workflowAction { // WorkflowActionDelete returns "automation:workflow.delete" action // // This function is auto-generated. +// func WorkflowActionDelete(props ...*workflowActionProps) *workflowAction { a := &workflowAction{ timestamp: time.Now(), @@ -349,6 +362,7 @@ func WorkflowActionDelete(props ...*workflowActionProps) *workflowAction { // WorkflowActionUndelete returns "automation:workflow.undelete" action // // This function is auto-generated. +// func WorkflowActionUndelete(props ...*workflowActionProps) *workflowAction { a := &workflowAction{ timestamp: time.Now(), @@ -368,6 +382,7 @@ func WorkflowActionUndelete(props ...*workflowActionProps) *workflowAction { // WorkflowActionExecute returns "automation:workflow.execute" action // // This function is auto-generated. +// func WorkflowActionExecute(props ...*workflowActionProps) *workflowAction { a := &workflowAction{ timestamp: time.Now(), @@ -390,7 +405,9 @@ func WorkflowActionExecute(props ...*workflowActionProps) *workflowAction { // WorkflowErrGeneric returns "automation:workflow.generic" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrGeneric(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -424,7 +441,9 @@ func WorkflowErrGeneric(mm ...*workflowActionProps) *errors.Error { // WorkflowErrNotFound returns "automation:workflow.notFound" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrNotFound(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -456,7 +475,9 @@ func WorkflowErrNotFound(mm ...*workflowActionProps) *errors.Error { // WorkflowErrInvalidID returns "automation:workflow.invalidID" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrInvalidID(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -488,7 +509,9 @@ func WorkflowErrInvalidID(mm ...*workflowActionProps) *errors.Error { // WorkflowErrDisabled returns "automation:workflow.disabled" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrDisabled(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -520,7 +543,9 @@ func WorkflowErrDisabled(mm ...*workflowActionProps) *errors.Error { // WorkflowErrInvalidHandle returns "automation:workflow.invalidHandle" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrInvalidHandle(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -552,7 +577,9 @@ func WorkflowErrInvalidHandle(mm ...*workflowActionProps) *errors.Error { // WorkflowErrMissingName returns "automation:workflow.missingName" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrMissingName(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -584,7 +611,9 @@ func WorkflowErrMissingName(mm ...*workflowActionProps) *errors.Error { // WorkflowErrStaleData returns "automation:workflow.staleData" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrStaleData(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -616,7 +645,9 @@ func WorkflowErrStaleData(mm ...*workflowActionProps) *errors.Error { // WorkflowErrNotAllowedToRead returns "automation:workflow.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrNotAllowedToRead(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -650,7 +681,9 @@ func WorkflowErrNotAllowedToRead(mm ...*workflowActionProps) *errors.Error { // WorkflowErrNotAllowedToSearch returns "automation:workflow.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrNotAllowedToSearch(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -684,7 +717,9 @@ func WorkflowErrNotAllowedToSearch(mm ...*workflowActionProps) *errors.Error { // WorkflowErrNotAllowedToCreate returns "automation:workflow.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrNotAllowedToCreate(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -718,7 +753,9 @@ func WorkflowErrNotAllowedToCreate(mm ...*workflowActionProps) *errors.Error { // WorkflowErrNotAllowedToUpdate returns "automation:workflow.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrNotAllowedToUpdate(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -752,7 +789,9 @@ func WorkflowErrNotAllowedToUpdate(mm ...*workflowActionProps) *errors.Error { // WorkflowErrNotAllowedToDelete returns "automation:workflow.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrNotAllowedToDelete(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -786,7 +825,9 @@ func WorkflowErrNotAllowedToDelete(mm ...*workflowActionProps) *errors.Error { // WorkflowErrNotAllowedToUndelete returns "automation:workflow.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrNotAllowedToUndelete(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -820,7 +861,9 @@ func WorkflowErrNotAllowedToUndelete(mm ...*workflowActionProps) *errors.Error { // WorkflowErrNotAllowedToExecute returns "automation:workflow.notAllowedToExecute" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrNotAllowedToExecute(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -854,7 +897,9 @@ func WorkflowErrNotAllowedToExecute(mm ...*workflowActionProps) *errors.Error { // WorkflowErrUnknownWorkflowStep returns "automation:workflow.unknownWorkflowStep" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrUnknownWorkflowStep(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -888,7 +933,9 @@ func WorkflowErrUnknownWorkflowStep(mm ...*workflowActionProps) *errors.Error { // WorkflowErrHandleNotUnique returns "automation:workflow.handleNotUnique" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrHandleNotUnique(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -922,7 +969,9 @@ func WorkflowErrHandleNotUnique(mm ...*workflowActionProps) *errors.Error { // WorkflowErrNotAllowedToExecuteCorredorStep returns "automation:workflow.notAllowedToExecuteCorredorStep" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrNotAllowedToExecuteCorredorStep(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -956,7 +1005,9 @@ func WorkflowErrNotAllowedToExecuteCorredorStep(mm ...*workflowActionProps) *err // WorkflowErrMaximumCallStackSizeExceeded returns "automation:workflow.maximumCallStackSizeExceeded" as *errors.Error // +// // This function is auto-generated. +// func WorkflowErrMaximumCallStackSizeExceeded(mm ...*workflowActionProps) *errors.Error { var p = &workflowActionProps{} if len(mm) > 0 { @@ -996,6 +1047,7 @@ func WorkflowErrMaximumCallStackSizeExceeded(mm ...*workflowActionProps) *errors // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc workflow) recordAction(ctx context.Context, props *workflowActionProps, actionFn func(...*workflowActionProps) *workflowAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/compose/automation/attachment_handler.gen.go b/server/compose/automation/attachment_handler.gen.go index 641862482..76c5329d1 100644 --- a/server/compose/automation/attachment_handler.gen.go +++ b/server/compose/automation/attachment_handler.gen.go @@ -50,10 +50,9 @@ type ( // Lookup function Attachment lookup // // expects implementation of lookup function: -// -// func (h attachmentHandler) lookup(ctx context.Context, args *attachmentLookupArgs) (results *attachmentLookupResults, err error) { -// return -// } +// func (h attachmentHandler) lookup(ctx context.Context, args *attachmentLookupArgs) (results *attachmentLookupResults, err error) { +// return +// } func (h attachmentHandler) Lookup() *atypes.Function { return &atypes.Function{ Ref: "attachmentLookup", @@ -145,10 +144,9 @@ func (a attachmentCreateArgs) GetContent() (bool, string, io.Reader, []byte) { // Create function Create file and attach it to a resource // // expects implementation of create function: -// -// func (h attachmentHandler) create(ctx context.Context, args *attachmentCreateArgs) (results *attachmentCreateResults, err error) { -// return -// } +// func (h attachmentHandler) create(ctx context.Context, args *attachmentCreateArgs) (results *attachmentCreateResults, err error) { +// return +// } func (h attachmentHandler) Create() *atypes.Function { return &atypes.Function{ Ref: "attachmentCreate", @@ -247,10 +245,9 @@ type ( // Delete function Delete attachment // // expects implementation of delete function: -// -// func (h attachmentHandler) delete(ctx context.Context, args *attachmentDeleteArgs) (err error) { -// return -// } +// func (h attachmentHandler) delete(ctx context.Context, args *attachmentDeleteArgs) (err error) { +// return +// } func (h attachmentHandler) Delete() *atypes.Function { return &atypes.Function{ Ref: "attachmentDelete", @@ -303,10 +300,9 @@ func (a attachmentOpenOriginalArgs) GetAttachment() (bool, uint64, *types.Attach // OpenOriginal function Open original attachment // // expects implementation of openOriginal function: -// -// func (h attachmentHandler) openOriginal(ctx context.Context, args *attachmentOpenOriginalArgs) (results *attachmentOpenOriginalResults, err error) { -// return -// } +// func (h attachmentHandler) openOriginal(ctx context.Context, args *attachmentOpenOriginalArgs) (results *attachmentOpenOriginalResults, err error) { +// return +// } func (h attachmentHandler) OpenOriginal() *atypes.Function { return &atypes.Function{ Ref: "attachmentOpenOriginal", @@ -398,10 +394,9 @@ func (a attachmentOpenPreviewArgs) GetAttachment() (bool, uint64, *types.Attachm // OpenPreview function Open attachment preview // // expects implementation of openPreview function: -// -// func (h attachmentHandler) openPreview(ctx context.Context, args *attachmentOpenPreviewArgs) (results *attachmentOpenPreviewResults, err error) { -// return -// } +// func (h attachmentHandler) openPreview(ctx context.Context, args *attachmentOpenPreviewArgs) (results *attachmentOpenPreviewResults, err error) { +// return +// } func (h attachmentHandler) OpenPreview() *atypes.Function { return &atypes.Function{ Ref: "attachmentOpenPreview", diff --git a/server/compose/automation/expr_types.gen.go b/server/compose/automation/expr_types.gen.go index aa4d0e1f9..3a6175c13 100644 --- a/server/compose/automation/expr_types.gen.go +++ b/server/compose/automation/expr_types.gen.go @@ -78,6 +78,7 @@ func (t *Attachment) AssignFieldValue(key string, val TypedValue) error { // // It allows gval lib to access Attachment's underlying value (*types.Attachment) // and it's fields +// func (t *Attachment) SelectGVal(ctx context.Context, k string) (interface{}, error) { t.mux.RLock() defer t.mux.RUnlock() @@ -278,6 +279,7 @@ func (t *ComposeModule) AssignFieldValue(key string, val TypedValue) error { // // It allows gval lib to access ComposeModule's underlying value (*types.Module) // and it's fields +// func (t *ComposeModule) SelectGVal(ctx context.Context, k string) (interface{}, error) { t.mux.RLock() defer t.mux.RUnlock() @@ -472,6 +474,7 @@ func (t *ComposeNamespace) AssignFieldValue(key string, val TypedValue) error { // // It allows gval lib to access ComposeNamespace's underlying value (*types.Namespace) // and it's fields +// func (t *ComposeNamespace) SelectGVal(ctx context.Context, k string) (interface{}, error) { t.mux.RLock() defer t.mux.RUnlock() diff --git a/server/compose/automation/modules_handler.gen.go b/server/compose/automation/modules_handler.gen.go index 2208a99d7..709d135bf 100644 --- a/server/compose/automation/modules_handler.gen.go +++ b/server/compose/automation/modules_handler.gen.go @@ -62,10 +62,9 @@ func (a modulesLookupArgs) GetNamespace() (bool, uint64, string, *types.Namespac // Lookup function Compose module lookup // // expects implementation of lookup function: -// -// func (h modulesHandler) lookup(ctx context.Context, args *modulesLookupArgs) (results *modulesLookupResults, err error) { -// return -// } +// func (h modulesHandler) lookup(ctx context.Context, args *modulesLookupArgs) (results *modulesLookupResults, err error) { +// return +// } func (h modulesHandler) Lookup() *atypes.Function { return &atypes.Function{ Ref: "composeModulesLookup", diff --git a/server/compose/automation/namespaces_handler.gen.go b/server/compose/automation/namespaces_handler.gen.go index 2bd690ef0..1cf4e57d2 100644 --- a/server/compose/automation/namespaces_handler.gen.go +++ b/server/compose/automation/namespaces_handler.gen.go @@ -52,10 +52,9 @@ func (a namespacesLookupArgs) GetNamespace() (bool, uint64, string, *types.Names // Lookup function Compose namespace lookup // // expects implementation of lookup function: -// -// func (h namespacesHandler) lookup(ctx context.Context, args *namespacesLookupArgs) (results *namespacesLookupResults, err error) { -// return -// } +// func (h namespacesHandler) lookup(ctx context.Context, args *namespacesLookupArgs) (results *namespacesLookupResults, err error) { +// return +// } func (h namespacesHandler) Lookup() *atypes.Function { return &atypes.Function{ Ref: "composeNamespacesLookup", diff --git a/server/compose/automation/records_handler.gen.go b/server/compose/automation/records_handler.gen.go index 3a909fd99..f48c5c4c6 100644 --- a/server/compose/automation/records_handler.gen.go +++ b/server/compose/automation/records_handler.gen.go @@ -81,10 +81,9 @@ func (a recordsLookupArgs) GetRecord() (bool, uint64, *types.Record) { // Lookup function Compose record lookup // // expects implementation of lookup function: -// -// func (h recordsHandler) lookup(ctx context.Context, args *recordsLookupArgs) (results *recordsLookupResults, err error) { -// return -// } +// func (h recordsHandler) lookup(ctx context.Context, args *recordsLookupArgs) (results *recordsLookupResults, err error) { +// return +// } func (h recordsHandler) Lookup() *atypes.Function { return &atypes.Function{ Ref: "composeRecordsLookup", @@ -256,10 +255,9 @@ func (a recordsSearchArgs) GetNamespace() (bool, uint64, string, *types.Namespac // Search function Compose records search // // expects implementation of search function: -// -// func (h recordsHandler) search(ctx context.Context, args *recordsSearchArgs) (results *recordsSearchResults, err error) { -// return -// } +// func (h recordsHandler) search(ctx context.Context, args *recordsSearchArgs) (results *recordsSearchResults, err error) { +// return +// } func (h recordsHandler) Search() *atypes.Function { return &atypes.Function{ Ref: "composeRecordsSearch", @@ -510,10 +508,9 @@ func (a recordsFirstArgs) GetNamespace() (bool, uint64, string, *types.Namespace // First function Compose record lookup (first created) // // expects implementation of first function: -// -// func (h recordsHandler) first(ctx context.Context, args *recordsFirstArgs) (results *recordsFirstResults, err error) { -// return -// } +// func (h recordsHandler) first(ctx context.Context, args *recordsFirstArgs) (results *recordsFirstResults, err error) { +// return +// } func (h recordsHandler) First() *atypes.Function { return &atypes.Function{ Ref: "composeRecordsFirst", @@ -640,10 +637,9 @@ func (a recordsLastArgs) GetNamespace() (bool, uint64, string, *types.Namespace) // Last function Compose record lookup (last created) // // expects implementation of last function: -// -// func (h recordsHandler) last(ctx context.Context, args *recordsLastArgs) (results *recordsLastResults, err error) { -// return -// } +// func (h recordsHandler) last(ctx context.Context, args *recordsLastArgs) (results *recordsLastResults, err error) { +// return +// } func (h recordsHandler) Last() *atypes.Function { return &atypes.Function{ Ref: "composeRecordsLast", @@ -796,10 +792,9 @@ func (a recordsEachArgs) GetNamespace() (bool, uint64, string, *types.Namespace) // Each function Compose records // // expects implementation of each function: -// -// func (h recordsHandler) each(ctx context.Context, args *recordsEachArgs) (results *recordsEachResults, err error) { -// return -// } +// func (h recordsHandler) each(ctx context.Context, args *recordsEachArgs) (results *recordsEachResults, err error) { +// return +// } func (h recordsHandler) Each() *atypes.Function { return &atypes.Function{ Ref: "composeRecordsEach", @@ -964,10 +959,9 @@ func (a recordsNewArgs) GetNamespace() (bool, uint64, string, *types.Namespace) // New function Compose record maker // // expects implementation of new function: -// -// func (h recordsHandler) new(ctx context.Context, args *recordsNewArgs) (results *recordsNewResults, err error) { -// return -// } +// func (h recordsHandler) new(ctx context.Context, args *recordsNewArgs) (results *recordsNewResults, err error) { +// return +// } func (h recordsHandler) New() *atypes.Function { return &atypes.Function{ Ref: "composeRecordsNew", @@ -1078,10 +1072,9 @@ type ( // Validate function Compose record validator // // expects implementation of validate function: -// -// func (h recordsHandler) validate(ctx context.Context, args *recordsValidateArgs) (results *recordsValidateResults, err error) { -// return -// } +// func (h recordsHandler) validate(ctx context.Context, args *recordsValidateArgs) (results *recordsValidateResults, err error) { +// return +// } func (h recordsHandler) Validate() *atypes.Function { return &atypes.Function{ Ref: "composeRecordsValidate", @@ -1159,10 +1152,9 @@ type ( // Create function Compose record create // // expects implementation of create function: -// -// func (h recordsHandler) create(ctx context.Context, args *recordsCreateArgs) (results *recordsCreateResults, err error) { -// return -// } +// func (h recordsHandler) create(ctx context.Context, args *recordsCreateArgs) (results *recordsCreateResults, err error) { +// return +// } func (h recordsHandler) Create() *atypes.Function { return &atypes.Function{ Ref: "composeRecordsCreate", @@ -1237,10 +1229,9 @@ type ( // Update function Compose record update // // expects implementation of update function: -// -// func (h recordsHandler) update(ctx context.Context, args *recordsUpdateArgs) (results *recordsUpdateResults, err error) { -// return -// } +// func (h recordsHandler) update(ctx context.Context, args *recordsUpdateArgs) (results *recordsUpdateResults, err error) { +// return +// } func (h recordsHandler) Update() *atypes.Function { return &atypes.Function{ Ref: "composeRecordsUpdate", @@ -1337,10 +1328,9 @@ func (a recordsDeleteArgs) GetRecord() (bool, uint64, *types.Record) { // Delete function Compose record delete // // expects implementation of delete function: -// -// func (h recordsHandler) delete(ctx context.Context, args *recordsDeleteArgs) (err error) { -// return -// } +// func (h recordsHandler) delete(ctx context.Context, args *recordsDeleteArgs) (err error) { +// return +// } func (h recordsHandler) Delete() *atypes.Function { return &atypes.Function{ Ref: "composeRecordsDelete", @@ -1464,10 +1454,9 @@ func (a recordsReportArgs) GetNamespace() (bool, uint64, string, *types.Namespac // Report function Report // // expects implementation of report function: -// -// func (h recordsHandler) report(ctx context.Context, args *recordsReportArgs) (results *recordsReportResults, err error) { -// return -// } +// func (h recordsHandler) report(ctx context.Context, args *recordsReportArgs) (results *recordsReportResults, err error) { +// return +// } func (h recordsHandler) Report() *atypes.Function { return &atypes.Function{ Ref: "composeRecordsReport", diff --git a/server/compose/model/models.gen.go b/server/compose/model/models.gen.go index d456d9da4..adde7cf18 100644 --- a/server/compose/model/models.gen.go +++ b/server/compose/model/models.gen.go @@ -795,17 +795,6 @@ var PageLayout = &dal.Model{ Store: &dal.CodecAlias{Ident: "parent_id"}, }, - &dal.Attribute{ - Ident: "ModuleID", - Type: &dal.TypeRef{ - RefAttribute: "id", - RefModel: &dal.ModelRef{ - ResourceType: "corteza::compose:module", - }, - }, - Store: &dal.CodecAlias{Ident: "rel_module"}, - }, - &dal.Attribute{ Ident: "NamespaceID", Type: &dal.TypeRef{ @@ -817,6 +806,15 @@ var PageLayout = &dal.Model{ Store: &dal.CodecAlias{Ident: "rel_namespace"}, }, + &dal.Attribute{ + Ident: "Weight", Sortable: true, + Type: &dal.TypeNumber{HasDefault: true, + DefaultValue: 0, + Precision: -1, Scale: -1, Meta: map[string]interface{}{"rdbms:type": "integer"}, + }, + Store: &dal.CodecAlias{Ident: "weight"}, + }, + &dal.Attribute{ Ident: "Meta", Type: &dal.TypeJSON{ @@ -884,17 +882,6 @@ var PageLayout = &dal.Model{ }, Indexes: dal.IndexSet{ - &dal.Index{ - Ident: "compose_page_layout_module", - Type: "BTREE", - - Fields: []*dal.IndexField{ - { - AttributeIdent: "ModuleID", - }, - }, - }, - &dal.Index{ Ident: "compose_page_layout_namespace", Type: "BTREE", diff --git a/server/compose/page_layout.cue b/server/compose/page_layout.cue index ecaa2fb23..804eb129f 100644 --- a/server/compose/page_layout.cue +++ b/server/compose/page_layout.cue @@ -28,18 +28,16 @@ pageLayout: { sortable: true } - module_id: { - ident: "moduleID", - goType: "uint64", - storeIdent: "rel_module" - dal: { type: "Ref", refModelResType: "corteza::compose:module" } - } namespace_id: { ident: "namespaceID", goType: "uint64", storeIdent: "rel_namespace" dal: { type: "Ref", refModelResType: "corteza::compose:namespace" } } + weight: { + goType: "int", sortable: true + dal: { type: "Number", default: 0, meta: { "rdbms:type": "integer" } } + } meta: { goType: "*types.PageLayoutMeta" @@ -69,7 +67,6 @@ pageLayout: { indexes: { "primary": { attribute: "id" } "namespace": { attribute: "namespace_id" }, - "module": { attribute: "module_id" }, "page_id": { attribute: "page_id" }, "parent_id": { attribute: "parent_id" }, "unique_handle": { @@ -83,14 +80,13 @@ pageLayout: { struct: { namespace_id: { goType: "uint64", ident: "namespaceID", storeIdent: "rel_namespace" } page_id: { goType: "uint64", ident: "pageID", storeIdent: "page_id" } - module_id: { goType: "uint64", ident: "moduleID", storeIdent: "rel_module" } default: { goType: "bool", ident: "default" } handle: { goType: "string" } deleted: { goType: "filter.State", storeIdent: "deleted_at" } } query: ["handle"] - byValue: ["handle", "namespace_id", "module_id", "page_id", "module_id"] + byValue: ["handle", "namespace_id", "page_id"] byNilState: ["deleted"] } @@ -121,12 +117,6 @@ pageLayout: { description: """ searches for page layour by handle (case-insensitive) """ - }, { - fields: ["namespace_id", "module_id"] - nullConstraint: ["deleted_at"] - description: """ - searches for page layour by moduleID - """ }, { fields: ["id"] description: """ @@ -136,6 +126,17 @@ pageLayout: { """ }, ] + + functions: [ + { + expIdent: "ReorderComposePageLayouts" + args: [ + { ident: "namespace_id", goType: "uint64" }, + { ident: "page_id", goType: "uint64" }, + { ident: "page_layout_ids", goType: "[]uint64" } + ] + } + ] } } } diff --git a/server/compose/rest.yaml b/server/compose/rest.yaml index ea2c33688..ccb324b46 100644 --- a/server/compose/rest.yaml +++ b/server/compose/rest.yaml @@ -670,6 +670,10 @@ endpoints: name: parentID required: false title: ParentID + - type: int + name: weight + required: false + title: Weight - type: uint64 name: moduleID required: false @@ -737,6 +741,10 @@ endpoints: name: parentID required: false title: ParentID + - type: int + name: weight + required: false + title: Weight - type: uint64 name: moduleID required: false @@ -770,6 +778,21 @@ endpoints: name: ownedBy required: false title: OwnedBy + - name: reorder + method: POST + title: Reorder page layouts + path: "/page/{pageID}/layout/reorder" + parameters: + path: + - type: uint64 + name: pageID + required: true + title: Page ID + post: + - type: "[]string" + name: pageIDs + required: true + title: Page ID order - name: delete path: "/page/{pageID}/layout/{pageLayoutID}" method: DELETE diff --git a/server/compose/rest/handlers/pageLayout.go b/server/compose/rest/handlers/pageLayout.go index 059d39445..5be660b2b 100644 --- a/server/compose/rest/handlers/pageLayout.go +++ b/server/compose/rest/handlers/pageLayout.go @@ -24,6 +24,7 @@ type ( Create(context.Context, *request.PageLayoutCreate) (interface{}, error) Read(context.Context, *request.PageLayoutRead) (interface{}, error) Update(context.Context, *request.PageLayoutUpdate) (interface{}, error) + Reorder(context.Context, *request.PageLayoutReorder) (interface{}, error) Delete(context.Context, *request.PageLayoutDelete) (interface{}, error) Undelete(context.Context, *request.PageLayoutUndelete) (interface{}, error) ListTranslations(context.Context, *request.PageLayoutListTranslations) (interface{}, error) @@ -37,6 +38,7 @@ type ( Create func(http.ResponseWriter, *http.Request) Read func(http.ResponseWriter, *http.Request) Update func(http.ResponseWriter, *http.Request) + Reorder func(http.ResponseWriter, *http.Request) Delete func(http.ResponseWriter, *http.Request) Undelete func(http.ResponseWriter, *http.Request) ListTranslations func(http.ResponseWriter, *http.Request) @@ -126,6 +128,22 @@ func NewPageLayout(h PageLayoutAPI) *PageLayout { api.Send(w, r, value) }, + Reorder: func(w http.ResponseWriter, r *http.Request) { + defer r.Body.Close() + params := request.NewPageLayoutReorder() + if err := params.Fill(r); err != nil { + api.Send(w, r, err) + return + } + + value, err := h.Reorder(r.Context(), params) + if err != nil { + api.Send(w, r, err) + return + } + + api.Send(w, r, value) + }, Delete: func(w http.ResponseWriter, r *http.Request) { defer r.Body.Close() params := request.NewPageLayoutDelete() @@ -201,6 +219,7 @@ func (h PageLayout) MountRoutes(r chi.Router, middlewares ...func(http.Handler) r.Post("/namespace/{namespaceID}/page/{pageID}/layout/", h.Create) r.Get("/namespace/{namespaceID}/page/{pageID}/layout/{pageLayoutID}", h.Read) r.Post("/namespace/{namespaceID}/page/{pageID}/layout/{pageLayoutID}", h.Update) + r.Post("/namespace/{namespaceID}/page/{pageID}/layout/reorder", h.Reorder) r.Delete("/namespace/{namespaceID}/page/{pageID}/layout/{pageLayoutID}", h.Delete) r.Post("/namespace/{namespaceID}/page/{pageID}/layout/{pageLayoutID}/undelete", h.Undelete) r.Get("/namespace/{namespaceID}/page/{pageID}/layout/{pageLayoutID}/translation", h.ListTranslations) diff --git a/server/compose/rest/page_layout.go b/server/compose/rest/page_layout.go index 8e850da49..64e492d2e 100644 --- a/server/compose/rest/page_layout.go +++ b/server/compose/rest/page_layout.go @@ -9,6 +9,7 @@ import ( "github.com/cortezaproject/corteza/server/compose/types" "github.com/cortezaproject/corteza/server/pkg/api" "github.com/cortezaproject/corteza/server/pkg/filter" + "github.com/cortezaproject/corteza/server/pkg/payload" ) type ( @@ -33,6 +34,7 @@ type ( Find(ctx context.Context, filter types.PageLayoutFilter) (set types.PageLayoutSet, f types.PageLayoutFilter, err error) Create(ctx context.Context, pageLayout *types.PageLayout) (*types.PageLayout, error) + Reorder(ctx context.Context, namespaceID uint64, pageID uint64, pageLayoutIDs []uint64) error Update(ctx context.Context, pageLayout *types.PageLayout) (*types.PageLayout, error) DeleteByID(ctx context.Context, namespaceID, pageID, pageLayoutID uint64) error UndeleteByID(ctx context.Context, namespaceID, pageID, pageLayoutID uint64) error @@ -61,7 +63,6 @@ func (ctrl *PageLayout) List(ctx context.Context, r *request.PageLayoutList) (in err error f = types.PageLayoutFilter{ NamespaceID: r.NamespaceID, - ModuleID: r.ModuleID, PageID: r.PageID, Labels: r.Labels, @@ -87,7 +88,6 @@ func (ctrl *PageLayout) ListNamespace(ctx context.Context, r *request.PageLayout err error f = types.PageLayoutFilter{ NamespaceID: r.NamespaceID, - ModuleID: r.ModuleID, PageID: r.PageID, Labels: r.Labels, @@ -114,8 +114,8 @@ func (ctrl *PageLayout) Create(ctx context.Context, r *request.PageLayoutCreate) layout = &types.PageLayout{ PageID: r.PageID, ParentID: r.ParentID, + Weight: r.Weight, NamespaceID: r.NamespaceID, - ModuleID: r.ModuleID, Handle: r.Handle, Primary: r.Primary, Meta: r.Meta, @@ -155,15 +155,19 @@ func (ctrl *PageLayout) UpdateTranslations(ctx context.Context, r *request.PageL // return api.OK(), ctrl.locale.Upsert(ctx, r.Translations) } +func (ctrl *PageLayout) Reorder(ctx context.Context, r *request.PageLayoutReorder) (interface{}, error) { + return api.OK(), ctrl.pageLayout.Reorder(ctx, r.NamespaceID, r.PageID, payload.ParseUint64s(r.PageIDs)) +} + func (ctrl *PageLayout) Update(ctx context.Context, r *request.PageLayoutUpdate) (interface{}, error) { var ( err error mod = &types.PageLayout{ ID: r.PageLayoutID, PageID: r.PageID, + Weight: r.Weight, ParentID: r.ParentID, NamespaceID: r.NamespaceID, - ModuleID: r.ModuleID, Handle: r.Handle, Primary: r.Primary, Meta: r.Meta, diff --git a/server/compose/rest/request/pageLayout.go b/server/compose/rest/request/pageLayout.go index 7976a0569..495f5d909 100644 --- a/server/compose/rest/request/pageLayout.go +++ b/server/compose/rest/request/pageLayout.go @@ -167,6 +167,11 @@ type ( // ParentID ParentID uint64 `json:",string"` + // Weight POST parameter + // + // Weight + Weight int + // ModuleID POST parameter // // ModuleID @@ -246,6 +251,11 @@ type ( // ParentID ParentID uint64 `json:",string"` + // Weight POST parameter + // + // Weight + Weight int + // ModuleID POST parameter // // ModuleID @@ -287,6 +297,23 @@ type ( OwnedBy uint64 `json:",string"` } + PageLayoutReorder struct { + // NamespaceID PATH parameter + // + // Namespace ID + NamespaceID uint64 `json:",string"` + + // PageID PATH parameter + // + // Page ID + PageID uint64 `json:",string"` + + // PageIDs POST parameter + // + // Page ID order + PageIDs []string + } + PageLayoutDelete struct { // NamespaceID PATH parameter // @@ -709,6 +736,7 @@ func (r PageLayoutCreate) Auditable() map[string]interface{} { "namespaceID": r.NamespaceID, "pageID": r.PageID, "parentID": r.ParentID, + "weight": r.Weight, "moduleID": r.ModuleID, "handle": r.Handle, "primary": r.Primary, @@ -735,6 +763,11 @@ func (r PageLayoutCreate) GetParentID() uint64 { return r.ParentID } +// Auditable returns all auditable/loggable parameters +func (r PageLayoutCreate) GetWeight() int { + return r.Weight +} + // Auditable returns all auditable/loggable parameters func (r PageLayoutCreate) GetModuleID() uint64 { return r.ModuleID @@ -803,6 +836,13 @@ func (r *PageLayoutCreate) Fill(req *http.Request) (err error) { } } + if val, ok := req.MultipartForm.Value["weight"]; ok && len(val) > 0 { + r.Weight, err = payload.ParseInt(val[0]), nil + if err != nil { + return err + } + } + if val, ok := req.MultipartForm.Value["moduleID"]; ok && len(val) > 0 { r.ModuleID, err = payload.ParseUint64(val[0]), nil if err != nil { @@ -885,6 +925,13 @@ func (r *PageLayoutCreate) Fill(req *http.Request) (err error) { } } + if val, ok := req.Form["weight"]; ok && len(val) > 0 { + r.Weight, err = payload.ParseInt(val[0]), nil + if err != nil { + return err + } + } + if val, ok := req.Form["moduleID"]; ok && len(val) > 0 { r.ModuleID, err = payload.ParseUint64(val[0]), nil if err != nil { @@ -1044,6 +1091,7 @@ func (r PageLayoutUpdate) Auditable() map[string]interface{} { "pageID": r.PageID, "pageLayoutID": r.PageLayoutID, "parentID": r.ParentID, + "weight": r.Weight, "moduleID": r.ModuleID, "handle": r.Handle, "primary": r.Primary, @@ -1075,6 +1123,11 @@ func (r PageLayoutUpdate) GetParentID() uint64 { return r.ParentID } +// Auditable returns all auditable/loggable parameters +func (r PageLayoutUpdate) GetWeight() int { + return r.Weight +} + // Auditable returns all auditable/loggable parameters func (r PageLayoutUpdate) GetModuleID() uint64 { return r.ModuleID @@ -1143,6 +1196,13 @@ func (r *PageLayoutUpdate) Fill(req *http.Request) (err error) { } } + if val, ok := req.MultipartForm.Value["weight"]; ok && len(val) > 0 { + r.Weight, err = payload.ParseInt(val[0]), nil + if err != nil { + return err + } + } + if val, ok := req.MultipartForm.Value["moduleID"]; ok && len(val) > 0 { r.ModuleID, err = payload.ParseUint64(val[0]), nil if err != nil { @@ -1225,6 +1285,13 @@ func (r *PageLayoutUpdate) Fill(req *http.Request) (err error) { } } + if val, ok := req.Form["weight"]; ok && len(val) > 0 { + r.Weight, err = payload.ParseInt(val[0]), nil + if err != nil { + return err + } + } + if val, ok := req.Form["moduleID"]; ok && len(val) > 0 { r.ModuleID, err = payload.ParseUint64(val[0]), nil if err != nil { @@ -1319,6 +1386,95 @@ func (r *PageLayoutUpdate) Fill(req *http.Request) (err error) { return err } +// NewPageLayoutReorder request +func NewPageLayoutReorder() *PageLayoutReorder { + return &PageLayoutReorder{} +} + +// Auditable returns all auditable/loggable parameters +func (r PageLayoutReorder) Auditable() map[string]interface{} { + return map[string]interface{}{ + "namespaceID": r.NamespaceID, + "pageID": r.PageID, + "pageIDs": r.PageIDs, + } +} + +// Auditable returns all auditable/loggable parameters +func (r PageLayoutReorder) GetNamespaceID() uint64 { + return r.NamespaceID +} + +// Auditable returns all auditable/loggable parameters +func (r PageLayoutReorder) GetPageID() uint64 { + return r.PageID +} + +// Auditable returns all auditable/loggable parameters +func (r PageLayoutReorder) GetPageIDs() []string { + return r.PageIDs +} + +// Fill processes request and fills internal variables +func (r *PageLayoutReorder) Fill(req *http.Request) (err error) { + + if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") { + err = json.NewDecoder(req.Body).Decode(r) + + switch { + case err == io.EOF: + err = nil + case err != nil: + return fmt.Errorf("error parsing http request body: %w", err) + } + } + + { + // Caching 32MB to memory, the rest to disk + if err = req.ParseMultipartForm(32 << 20); err != nil && err != http.ErrNotMultipart { + return err + } else if err == nil { + // Multipart params + + } + } + + { + if err = req.ParseForm(); err != nil { + return err + } + + // POST params + + //if val, ok := req.Form["pageIDs[]"]; ok && len(val) > 0 { + // r.PageIDs, err = val, nil + // if err != nil { + // return err + // } + //} + } + + { + var val string + // path params + + val = chi.URLParam(req, "namespaceID") + r.NamespaceID, err = payload.ParseUint64(val), nil + if err != nil { + return err + } + + val = chi.URLParam(req, "pageID") + r.PageID, err = payload.ParseUint64(val), nil + if err != nil { + return err + } + + } + + return err +} + // NewPageLayoutDelete request func NewPageLayoutDelete() *PageLayoutDelete { return &PageLayoutDelete{} diff --git a/server/compose/service/access_control_actions.gen.go b/server/compose/service/access_control_actions.gen.go index 99d3d159c..4eb738711 100644 --- a/server/compose/service/access_control_actions.gen.go +++ b/server/compose/service/access_control_actions.gen.go @@ -52,6 +52,7 @@ var ( // setRule updates accessControlActionProps's rule // // This function is auto-generated. +// func (p *accessControlActionProps) setRule(rule *rbac.Rule) *accessControlActionProps { p.rule = rule return p @@ -60,6 +61,7 @@ func (p *accessControlActionProps) setRule(rule *rbac.Rule) *accessControlAction // Serialize converts accessControlActionProps to actionlog.Meta // // This function is auto-generated. +// func (p accessControlActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -78,6 +80,7 @@ func (p accessControlActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p accessControlActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -126,6 +129,7 @@ func (p accessControlActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *accessControlAction) String() string { var props = &accessControlActionProps{} @@ -153,6 +157,7 @@ func (e *accessControlAction) ToAction() *actionlog.Action { // AccessControlActionGrant returns "compose:access_control.grant" action // // This function is auto-generated. +// func AccessControlActionGrant(props ...*accessControlActionProps) *accessControlAction { a := &accessControlAction{ timestamp: time.Now(), @@ -175,7 +180,9 @@ func AccessControlActionGrant(props ...*accessControlActionProps) *accessControl // AccessControlErrGeneric returns "compose:access_control.generic" as *errors.Error // +// // This function is auto-generated. +// func AccessControlErrGeneric(mm ...*accessControlActionProps) *errors.Error { var p = &accessControlActionProps{} if len(mm) > 0 { @@ -209,7 +216,9 @@ func AccessControlErrGeneric(mm ...*accessControlActionProps) *errors.Error { // AccessControlErrNotAllowedToSetPermissions returns "compose:access_control.notAllowedToSetPermissions" as *errors.Error // +// // This function is auto-generated. +// func AccessControlErrNotAllowedToSetPermissions(mm ...*accessControlActionProps) *errors.Error { var p = &accessControlActionProps{} if len(mm) > 0 { @@ -247,6 +256,7 @@ func AccessControlErrNotAllowedToSetPermissions(mm ...*accessControlActionProps) // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc accessControl) recordAction(ctx context.Context, props *accessControlActionProps, actionFn func(...*accessControlActionProps) *accessControlAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/compose/service/attachment_actions.gen.go b/server/compose/service/attachment_actions.gen.go index 6ebf201c2..318a0a0bb 100644 --- a/server/compose/service/attachment_actions.gen.go +++ b/server/compose/service/attachment_actions.gen.go @@ -61,6 +61,7 @@ var ( // setSize updates attachmentActionProps's size // // This function is auto-generated. +// func (p *attachmentActionProps) setSize(size int64) *attachmentActionProps { p.size = size return p @@ -69,6 +70,7 @@ func (p *attachmentActionProps) setSize(size int64) *attachmentActionProps { // setName updates attachmentActionProps's name // // This function is auto-generated. +// func (p *attachmentActionProps) setName(name string) *attachmentActionProps { p.name = name return p @@ -77,6 +79,7 @@ func (p *attachmentActionProps) setName(name string) *attachmentActionProps { // setMimetype updates attachmentActionProps's mimetype // // This function is auto-generated. +// func (p *attachmentActionProps) setMimetype(mimetype string) *attachmentActionProps { p.mimetype = mimetype return p @@ -85,6 +88,7 @@ func (p *attachmentActionProps) setMimetype(mimetype string) *attachmentActionPr // setUrl updates attachmentActionProps's url // // This function is auto-generated. +// func (p *attachmentActionProps) setUrl(url string) *attachmentActionProps { p.url = url return p @@ -93,6 +97,7 @@ func (p *attachmentActionProps) setUrl(url string) *attachmentActionProps { // setAttachment updates attachmentActionProps's attachment // // This function is auto-generated. +// func (p *attachmentActionProps) setAttachment(attachment *types.Attachment) *attachmentActionProps { p.attachment = attachment return p @@ -101,6 +106,7 @@ func (p *attachmentActionProps) setAttachment(attachment *types.Attachment) *att // setFilter updates attachmentActionProps's filter // // This function is auto-generated. +// func (p *attachmentActionProps) setFilter(filter *types.AttachmentFilter) *attachmentActionProps { p.filter = filter return p @@ -109,6 +115,7 @@ func (p *attachmentActionProps) setFilter(filter *types.AttachmentFilter) *attac // setNamespace updates attachmentActionProps's namespace // // This function is auto-generated. +// func (p *attachmentActionProps) setNamespace(namespace *types.Namespace) *attachmentActionProps { p.namespace = namespace return p @@ -117,6 +124,7 @@ func (p *attachmentActionProps) setNamespace(namespace *types.Namespace) *attach // setRecord updates attachmentActionProps's record // // This function is auto-generated. +// func (p *attachmentActionProps) setRecord(record *types.Record) *attachmentActionProps { p.record = record return p @@ -125,6 +133,7 @@ func (p *attachmentActionProps) setRecord(record *types.Record) *attachmentActio // setPage updates attachmentActionProps's page // // This function is auto-generated. +// func (p *attachmentActionProps) setPage(page *types.Page) *attachmentActionProps { p.page = page return p @@ -133,6 +142,7 @@ func (p *attachmentActionProps) setPage(page *types.Page) *attachmentActionProps // setModule updates attachmentActionProps's module // // This function is auto-generated. +// func (p *attachmentActionProps) setModule(module *types.Module) *attachmentActionProps { p.module = module return p @@ -141,6 +151,7 @@ func (p *attachmentActionProps) setModule(module *types.Module) *attachmentActio // Serialize converts attachmentActionProps to actionlog.Meta // // This function is auto-generated. +// func (p attachmentActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -192,6 +203,7 @@ func (p attachmentActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p attachmentActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -332,6 +344,7 @@ func (p attachmentActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *attachmentAction) String() string { var props = &attachmentActionProps{} @@ -359,6 +372,7 @@ func (e *attachmentAction) ToAction() *actionlog.Action { // AttachmentActionSearch returns "compose:attachment.search" action // // This function is auto-generated. +// func AttachmentActionSearch(props ...*attachmentActionProps) *attachmentAction { a := &attachmentAction{ timestamp: time.Now(), @@ -378,6 +392,7 @@ func AttachmentActionSearch(props ...*attachmentActionProps) *attachmentAction { // AttachmentActionLookup returns "compose:attachment.lookup" action // // This function is auto-generated. +// func AttachmentActionLookup(props ...*attachmentActionProps) *attachmentAction { a := &attachmentAction{ timestamp: time.Now(), @@ -397,6 +412,7 @@ func AttachmentActionLookup(props ...*attachmentActionProps) *attachmentAction { // AttachmentActionCreate returns "compose:attachment.create" action // // This function is auto-generated. +// func AttachmentActionCreate(props ...*attachmentActionProps) *attachmentAction { a := &attachmentAction{ timestamp: time.Now(), @@ -416,6 +432,7 @@ func AttachmentActionCreate(props ...*attachmentActionProps) *attachmentAction { // AttachmentActionDelete returns "compose:attachment.delete" action // // This function is auto-generated. +// func AttachmentActionDelete(props ...*attachmentActionProps) *attachmentAction { a := &attachmentAction{ timestamp: time.Now(), @@ -438,7 +455,9 @@ func AttachmentActionDelete(props ...*attachmentActionProps) *attachmentAction { // AttachmentErrGeneric returns "compose:attachment.generic" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrGeneric(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -472,7 +491,9 @@ func AttachmentErrGeneric(mm ...*attachmentActionProps) *errors.Error { // AttachmentErrNotFound returns "compose:attachment.notFound" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotFound(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -504,7 +525,9 @@ func AttachmentErrNotFound(mm ...*attachmentActionProps) *errors.Error { // AttachmentErrNamespaceNotFound returns "compose:attachment.namespaceNotFound" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNamespaceNotFound(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -536,7 +559,9 @@ func AttachmentErrNamespaceNotFound(mm ...*attachmentActionProps) *errors.Error // AttachmentErrModuleNotFound returns "compose:attachment.moduleNotFound" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrModuleNotFound(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -568,7 +593,9 @@ func AttachmentErrModuleNotFound(mm ...*attachmentActionProps) *errors.Error { // AttachmentErrPageNotFound returns "compose:attachment.pageNotFound" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrPageNotFound(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -600,7 +627,9 @@ func AttachmentErrPageNotFound(mm ...*attachmentActionProps) *errors.Error { // AttachmentErrRecordNotFound returns "compose:attachment.recordNotFound" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrRecordNotFound(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -632,7 +661,9 @@ func AttachmentErrRecordNotFound(mm ...*attachmentActionProps) *errors.Error { // AttachmentErrInvalidID returns "compose:attachment.invalidID" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrInvalidID(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -664,7 +695,9 @@ func AttachmentErrInvalidID(mm ...*attachmentActionProps) *errors.Error { // AttachmentErrInvalidNamespaceID returns "compose:attachment.invalidNamespaceID" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrInvalidNamespaceID(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -696,7 +729,9 @@ func AttachmentErrInvalidNamespaceID(mm ...*attachmentActionProps) *errors.Error // AttachmentErrInvalidModuleID returns "compose:attachment.invalidModuleID" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrInvalidModuleID(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -728,7 +763,9 @@ func AttachmentErrInvalidModuleID(mm ...*attachmentActionProps) *errors.Error { // AttachmentErrInvalidModuleField returns "compose:attachment.invalidModuleField" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrInvalidModuleField(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -760,7 +797,9 @@ func AttachmentErrInvalidModuleField(mm ...*attachmentActionProps) *errors.Error // AttachmentErrInvalidPageID returns "compose:attachment.invalidPageID" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrInvalidPageID(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -792,7 +831,9 @@ func AttachmentErrInvalidPageID(mm ...*attachmentActionProps) *errors.Error { // AttachmentErrInvalidRecordID returns "compose:attachment.invalidRecordID" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrInvalidRecordID(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -824,7 +865,9 @@ func AttachmentErrInvalidRecordID(mm ...*attachmentActionProps) *errors.Error { // AttachmentErrTooLarge returns "compose:attachment.tooLarge" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrTooLarge(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -858,7 +901,9 @@ func AttachmentErrTooLarge(mm ...*attachmentActionProps) *errors.Error { // AttachmentErrNotAllowedToUploadThisType returns "compose:attachment.notAllowedToUploadThisType" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToUploadThisType(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -892,7 +937,9 @@ func AttachmentErrNotAllowedToUploadThisType(mm ...*attachmentActionProps) *erro // AttachmentErrNotAllowedToListAttachments returns "compose:attachment.notAllowedToListAttachments" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToListAttachments(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -926,7 +973,9 @@ func AttachmentErrNotAllowedToListAttachments(mm ...*attachmentActionProps) *err // AttachmentErrNotAllowedToCreate returns "compose:attachment.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToCreate(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -960,7 +1009,9 @@ func AttachmentErrNotAllowedToCreate(mm ...*attachmentActionProps) *errors.Error // AttachmentErrNotAllowedToCreateEmptyAttachment returns "compose:attachment.notAllowedToCreateEmptyAttachment" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToCreateEmptyAttachment(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -994,7 +1045,9 @@ func AttachmentErrNotAllowedToCreateEmptyAttachment(mm ...*attachmentActionProps // AttachmentErrFailedToExtractMimeType returns "compose:attachment.failedToExtractMimeType" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrFailedToExtractMimeType(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -1026,7 +1079,9 @@ func AttachmentErrFailedToExtractMimeType(mm ...*attachmentActionProps) *errors. // AttachmentErrFailedToStoreFile returns "compose:attachment.failedToStoreFile" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrFailedToStoreFile(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -1058,7 +1113,9 @@ func AttachmentErrFailedToStoreFile(mm ...*attachmentActionProps) *errors.Error // AttachmentErrFailedToProcessImage returns "compose:attachment.failedToProcessImage" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrFailedToProcessImage(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -1090,7 +1147,9 @@ func AttachmentErrFailedToProcessImage(mm ...*attachmentActionProps) *errors.Err // AttachmentErrNotAllowedToRead returns "compose:attachment.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToRead(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -1124,7 +1183,9 @@ func AttachmentErrNotAllowedToRead(mm ...*attachmentActionProps) *errors.Error { // AttachmentErrNotAllowedToSearch returns "compose:attachment.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToSearch(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -1158,7 +1219,9 @@ func AttachmentErrNotAllowedToSearch(mm ...*attachmentActionProps) *errors.Error // AttachmentErrNotAllowedToReadNamespace returns "compose:attachment.notAllowedToReadNamespace" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToReadNamespace(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -1192,7 +1255,9 @@ func AttachmentErrNotAllowedToReadNamespace(mm ...*attachmentActionProps) *error // AttachmentErrNotAllowedToReadPage returns "compose:attachment.notAllowedToReadPage" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToReadPage(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -1226,7 +1291,9 @@ func AttachmentErrNotAllowedToReadPage(mm ...*attachmentActionProps) *errors.Err // AttachmentErrNotAllowedToReadRecord returns "compose:attachment.notAllowedToReadRecord" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToReadRecord(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -1260,7 +1327,9 @@ func AttachmentErrNotAllowedToReadRecord(mm ...*attachmentActionProps) *errors.E // AttachmentErrNotAllowedToUpdatePage returns "compose:attachment.notAllowedToUpdatePage" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToUpdatePage(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -1294,7 +1363,9 @@ func AttachmentErrNotAllowedToUpdatePage(mm ...*attachmentActionProps) *errors.E // AttachmentErrNotAllowedToCreateRecords returns "compose:attachment.notAllowedToCreateRecords" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToCreateRecords(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -1328,7 +1399,9 @@ func AttachmentErrNotAllowedToCreateRecords(mm ...*attachmentActionProps) *error // AttachmentErrNotAllowedToUpdateRecord returns "compose:attachment.notAllowedToUpdateRecord" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToUpdateRecord(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -1362,7 +1435,9 @@ func AttachmentErrNotAllowedToUpdateRecord(mm ...*attachmentActionProps) *errors // AttachmentErrNotAllowedToUpdateNamespace returns "compose:attachment.notAllowedToUpdateNamespace" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToUpdateNamespace(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -1402,6 +1477,7 @@ func AttachmentErrNotAllowedToUpdateNamespace(mm ...*attachmentActionProps) *err // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc attachment) recordAction(ctx context.Context, props *attachmentActionProps, actionFn func(...*attachmentActionProps) *attachmentAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/compose/service/chart_actions.gen.go b/server/compose/service/chart_actions.gen.go index 6c8fece79..c536819fd 100644 --- a/server/compose/service/chart_actions.gen.go +++ b/server/compose/service/chart_actions.gen.go @@ -55,6 +55,7 @@ var ( // setChart updates chartActionProps's chart // // This function is auto-generated. +// func (p *chartActionProps) setChart(chart *types.Chart) *chartActionProps { p.chart = chart return p @@ -63,6 +64,7 @@ func (p *chartActionProps) setChart(chart *types.Chart) *chartActionProps { // setChanged updates chartActionProps's changed // // This function is auto-generated. +// func (p *chartActionProps) setChanged(changed *types.Chart) *chartActionProps { p.changed = changed return p @@ -71,6 +73,7 @@ func (p *chartActionProps) setChanged(changed *types.Chart) *chartActionProps { // setFilter updates chartActionProps's filter // // This function is auto-generated. +// func (p *chartActionProps) setFilter(filter *types.ChartFilter) *chartActionProps { p.filter = filter return p @@ -79,6 +82,7 @@ func (p *chartActionProps) setFilter(filter *types.ChartFilter) *chartActionProp // setNamespace updates chartActionProps's namespace // // This function is auto-generated. +// func (p *chartActionProps) setNamespace(namespace *types.Namespace) *chartActionProps { p.namespace = namespace return p @@ -87,6 +91,7 @@ func (p *chartActionProps) setNamespace(namespace *types.Namespace) *chartAction // Serialize converts chartActionProps to actionlog.Meta // // This function is auto-generated. +// func (p chartActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -124,6 +129,7 @@ func (p chartActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p chartActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -228,6 +234,7 @@ func (p chartActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *chartAction) String() string { var props = &chartActionProps{} @@ -255,6 +262,7 @@ func (e *chartAction) ToAction() *actionlog.Action { // ChartActionSearch returns "compose:chart.search" action // // This function is auto-generated. +// func ChartActionSearch(props ...*chartActionProps) *chartAction { a := &chartAction{ timestamp: time.Now(), @@ -274,6 +282,7 @@ func ChartActionSearch(props ...*chartActionProps) *chartAction { // ChartActionLookup returns "compose:chart.lookup" action // // This function is auto-generated. +// func ChartActionLookup(props ...*chartActionProps) *chartAction { a := &chartAction{ timestamp: time.Now(), @@ -293,6 +302,7 @@ func ChartActionLookup(props ...*chartActionProps) *chartAction { // ChartActionCreate returns "compose:chart.create" action // // This function is auto-generated. +// func ChartActionCreate(props ...*chartActionProps) *chartAction { a := &chartAction{ timestamp: time.Now(), @@ -312,6 +322,7 @@ func ChartActionCreate(props ...*chartActionProps) *chartAction { // ChartActionUpdate returns "compose:chart.update" action // // This function is auto-generated. +// func ChartActionUpdate(props ...*chartActionProps) *chartAction { a := &chartAction{ timestamp: time.Now(), @@ -331,6 +342,7 @@ func ChartActionUpdate(props ...*chartActionProps) *chartAction { // ChartActionDelete returns "compose:chart.delete" action // // This function is auto-generated. +// func ChartActionDelete(props ...*chartActionProps) *chartAction { a := &chartAction{ timestamp: time.Now(), @@ -350,6 +362,7 @@ func ChartActionDelete(props ...*chartActionProps) *chartAction { // ChartActionUndelete returns "compose:chart.undelete" action // // This function is auto-generated. +// func ChartActionUndelete(props ...*chartActionProps) *chartAction { a := &chartAction{ timestamp: time.Now(), @@ -369,6 +382,7 @@ func ChartActionUndelete(props ...*chartActionProps) *chartAction { // ChartActionReorder returns "compose:chart.reorder" action // // This function is auto-generated. +// func ChartActionReorder(props ...*chartActionProps) *chartAction { a := &chartAction{ timestamp: time.Now(), @@ -391,7 +405,9 @@ func ChartActionReorder(props ...*chartActionProps) *chartAction { // ChartErrGeneric returns "compose:chart.generic" as *errors.Error // +// // This function is auto-generated. +// func ChartErrGeneric(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -425,7 +441,9 @@ func ChartErrGeneric(mm ...*chartActionProps) *errors.Error { // ChartErrNotFound returns "compose:chart.notFound" as *errors.Error // +// // This function is auto-generated. +// func ChartErrNotFound(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -457,7 +475,9 @@ func ChartErrNotFound(mm ...*chartActionProps) *errors.Error { // ChartErrNamespaceNotFound returns "compose:chart.namespaceNotFound" as *errors.Error // +// // This function is auto-generated. +// func ChartErrNamespaceNotFound(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -489,7 +509,9 @@ func ChartErrNamespaceNotFound(mm ...*chartActionProps) *errors.Error { // ChartErrModuleNotFound returns "compose:chart.moduleNotFound" as *errors.Error // +// // This function is auto-generated. +// func ChartErrModuleNotFound(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -521,7 +543,9 @@ func ChartErrModuleNotFound(mm ...*chartActionProps) *errors.Error { // ChartErrInvalidID returns "compose:chart.invalidID" as *errors.Error // +// // This function is auto-generated. +// func ChartErrInvalidID(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -553,7 +577,9 @@ func ChartErrInvalidID(mm ...*chartActionProps) *errors.Error { // ChartErrInvalidHandle returns "compose:chart.invalidHandle" as *errors.Error // +// // This function is auto-generated. +// func ChartErrInvalidHandle(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -585,7 +611,9 @@ func ChartErrInvalidHandle(mm ...*chartActionProps) *errors.Error { // ChartErrHandleNotUnique returns "compose:chart.handleNotUnique" as *errors.Error // +// // This function is auto-generated. +// func ChartErrHandleNotUnique(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -619,7 +647,9 @@ func ChartErrHandleNotUnique(mm ...*chartActionProps) *errors.Error { // ChartErrStaleData returns "compose:chart.staleData" as *errors.Error // +// // This function is auto-generated. +// func ChartErrStaleData(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -651,7 +681,9 @@ func ChartErrStaleData(mm ...*chartActionProps) *errors.Error { // ChartErrInvalidNamespaceID returns "compose:chart.invalidNamespaceID" as *errors.Error // +// // This function is auto-generated. +// func ChartErrInvalidNamespaceID(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -683,7 +715,9 @@ func ChartErrInvalidNamespaceID(mm ...*chartActionProps) *errors.Error { // ChartErrNotAllowedToRead returns "compose:chart.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func ChartErrNotAllowedToRead(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -717,7 +751,9 @@ func ChartErrNotAllowedToRead(mm ...*chartActionProps) *errors.Error { // ChartErrNotAllowedToSearch returns "compose:chart.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func ChartErrNotAllowedToSearch(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -751,7 +787,9 @@ func ChartErrNotAllowedToSearch(mm ...*chartActionProps) *errors.Error { // ChartErrNotAllowedToReadNamespace returns "compose:chart.notAllowedToReadNamespace" as *errors.Error // +// // This function is auto-generated. +// func ChartErrNotAllowedToReadNamespace(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -785,7 +823,9 @@ func ChartErrNotAllowedToReadNamespace(mm ...*chartActionProps) *errors.Error { // ChartErrNotAllowedToCreate returns "compose:chart.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func ChartErrNotAllowedToCreate(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -819,7 +859,9 @@ func ChartErrNotAllowedToCreate(mm ...*chartActionProps) *errors.Error { // ChartErrNotAllowedToUpdate returns "compose:chart.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func ChartErrNotAllowedToUpdate(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -853,7 +895,9 @@ func ChartErrNotAllowedToUpdate(mm ...*chartActionProps) *errors.Error { // ChartErrNotAllowedToDelete returns "compose:chart.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func ChartErrNotAllowedToDelete(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -887,7 +931,9 @@ func ChartErrNotAllowedToDelete(mm ...*chartActionProps) *errors.Error { // ChartErrNotAllowedToUndelete returns "compose:chart.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func ChartErrNotAllowedToUndelete(mm ...*chartActionProps) *errors.Error { var p = &chartActionProps{} if len(mm) > 0 { @@ -927,6 +973,7 @@ func ChartErrNotAllowedToUndelete(mm ...*chartActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc chart) recordAction(ctx context.Context, props *chartActionProps, actionFn func(...*chartActionProps) *chartAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/compose/service/module_actions.gen.go b/server/compose/service/module_actions.gen.go index cb2c1cbeb..8d1d9e11b 100644 --- a/server/compose/service/module_actions.gen.go +++ b/server/compose/service/module_actions.gen.go @@ -55,6 +55,7 @@ var ( // setModule updates moduleActionProps's module // // This function is auto-generated. +// func (p *moduleActionProps) setModule(module *types.Module) *moduleActionProps { p.module = module return p @@ -63,6 +64,7 @@ func (p *moduleActionProps) setModule(module *types.Module) *moduleActionProps { // setChanged updates moduleActionProps's changed // // This function is auto-generated. +// func (p *moduleActionProps) setChanged(changed *types.Module) *moduleActionProps { p.changed = changed return p @@ -71,6 +73,7 @@ func (p *moduleActionProps) setChanged(changed *types.Module) *moduleActionProps // setFilter updates moduleActionProps's filter // // This function is auto-generated. +// func (p *moduleActionProps) setFilter(filter *types.ModuleFilter) *moduleActionProps { p.filter = filter return p @@ -79,6 +82,7 @@ func (p *moduleActionProps) setFilter(filter *types.ModuleFilter) *moduleActionP // setNamespace updates moduleActionProps's namespace // // This function is auto-generated. +// func (p *moduleActionProps) setNamespace(namespace *types.Namespace) *moduleActionProps { p.namespace = namespace return p @@ -87,6 +91,7 @@ func (p *moduleActionProps) setNamespace(namespace *types.Namespace) *moduleActi // Serialize converts moduleActionProps to actionlog.Meta // // This function is auto-generated. +// func (p moduleActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -127,6 +132,7 @@ func (p moduleActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p moduleActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -237,6 +243,7 @@ func (p moduleActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *moduleAction) String() string { var props = &moduleActionProps{} @@ -264,6 +271,7 @@ func (e *moduleAction) ToAction() *actionlog.Action { // ModuleActionSearch returns "compose:module.search" action // // This function is auto-generated. +// func ModuleActionSearch(props ...*moduleActionProps) *moduleAction { a := &moduleAction{ timestamp: time.Now(), @@ -283,6 +291,7 @@ func ModuleActionSearch(props ...*moduleActionProps) *moduleAction { // ModuleActionLookup returns "compose:module.lookup" action // // This function is auto-generated. +// func ModuleActionLookup(props ...*moduleActionProps) *moduleAction { a := &moduleAction{ timestamp: time.Now(), @@ -302,6 +311,7 @@ func ModuleActionLookup(props ...*moduleActionProps) *moduleAction { // ModuleActionCreate returns "compose:module.create" action // // This function is auto-generated. +// func ModuleActionCreate(props ...*moduleActionProps) *moduleAction { a := &moduleAction{ timestamp: time.Now(), @@ -321,6 +331,7 @@ func ModuleActionCreate(props ...*moduleActionProps) *moduleAction { // ModuleActionUpdate returns "compose:module.update" action // // This function is auto-generated. +// func ModuleActionUpdate(props ...*moduleActionProps) *moduleAction { a := &moduleAction{ timestamp: time.Now(), @@ -340,6 +351,7 @@ func ModuleActionUpdate(props ...*moduleActionProps) *moduleAction { // ModuleActionDelete returns "compose:module.delete" action // // This function is auto-generated. +// func ModuleActionDelete(props ...*moduleActionProps) *moduleAction { a := &moduleAction{ timestamp: time.Now(), @@ -359,6 +371,7 @@ func ModuleActionDelete(props ...*moduleActionProps) *moduleAction { // ModuleActionUndelete returns "compose:module.undelete" action // // This function is auto-generated. +// func ModuleActionUndelete(props ...*moduleActionProps) *moduleAction { a := &moduleAction{ timestamp: time.Now(), @@ -381,7 +394,9 @@ func ModuleActionUndelete(props ...*moduleActionProps) *moduleAction { // ModuleErrGeneric returns "compose:module.generic" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrGeneric(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -415,7 +430,9 @@ func ModuleErrGeneric(mm ...*moduleActionProps) *errors.Error { // ModuleErrNotFound returns "compose:module.notFound" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrNotFound(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -447,7 +464,9 @@ func ModuleErrNotFound(mm ...*moduleActionProps) *errors.Error { // ModuleErrNamespaceNotFound returns "compose:module.namespaceNotFound" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrNamespaceNotFound(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -479,7 +498,9 @@ func ModuleErrNamespaceNotFound(mm ...*moduleActionProps) *errors.Error { // ModuleErrInvalidID returns "compose:module.invalidID" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrInvalidID(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -511,7 +532,9 @@ func ModuleErrInvalidID(mm ...*moduleActionProps) *errors.Error { // ModuleErrInvalidHandle returns "compose:module.invalidHandle" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrInvalidHandle(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -543,7 +566,9 @@ func ModuleErrInvalidHandle(mm ...*moduleActionProps) *errors.Error { // ModuleErrHandleNotUnique returns "compose:module.handleNotUnique" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrHandleNotUnique(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -577,7 +602,9 @@ func ModuleErrHandleNotUnique(mm ...*moduleActionProps) *errors.Error { // ModuleErrNameNotUnique returns "compose:module.nameNotUnique" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrNameNotUnique(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -611,7 +638,9 @@ func ModuleErrNameNotUnique(mm ...*moduleActionProps) *errors.Error { // ModuleErrFieldNameReserved returns "compose:module.fieldNameReserved" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrFieldNameReserved(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -643,7 +672,9 @@ func ModuleErrFieldNameReserved(mm ...*moduleActionProps) *errors.Error { // ModuleErrStaleData returns "compose:module.staleData" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrStaleData(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -675,7 +706,9 @@ func ModuleErrStaleData(mm ...*moduleActionProps) *errors.Error { // ModuleErrInvalidNamespaceID returns "compose:module.invalidNamespaceID" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrInvalidNamespaceID(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -707,7 +740,9 @@ func ModuleErrInvalidNamespaceID(mm ...*moduleActionProps) *errors.Error { // ModuleErrNotAllowedToRead returns "compose:module.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrNotAllowedToRead(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -741,7 +776,9 @@ func ModuleErrNotAllowedToRead(mm ...*moduleActionProps) *errors.Error { // ModuleErrNotAllowedToSearch returns "compose:module.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrNotAllowedToSearch(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -775,7 +812,9 @@ func ModuleErrNotAllowedToSearch(mm ...*moduleActionProps) *errors.Error { // ModuleErrNotAllowedToReadNamespace returns "compose:module.notAllowedToReadNamespace" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrNotAllowedToReadNamespace(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -809,7 +848,9 @@ func ModuleErrNotAllowedToReadNamespace(mm ...*moduleActionProps) *errors.Error // ModuleErrNotAllowedToListModules returns "compose:module.notAllowedToListModules" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrNotAllowedToListModules(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -843,7 +884,9 @@ func ModuleErrNotAllowedToListModules(mm ...*moduleActionProps) *errors.Error { // ModuleErrNotAllowedToCreate returns "compose:module.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrNotAllowedToCreate(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -877,7 +920,9 @@ func ModuleErrNotAllowedToCreate(mm ...*moduleActionProps) *errors.Error { // ModuleErrNotAllowedToUpdate returns "compose:module.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrNotAllowedToUpdate(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -911,7 +956,9 @@ func ModuleErrNotAllowedToUpdate(mm ...*moduleActionProps) *errors.Error { // ModuleErrNotAllowedToDelete returns "compose:module.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrNotAllowedToDelete(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -945,7 +992,9 @@ func ModuleErrNotAllowedToDelete(mm ...*moduleActionProps) *errors.Error { // ModuleErrNotAllowedToUndelete returns "compose:module.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func ModuleErrNotAllowedToUndelete(mm ...*moduleActionProps) *errors.Error { var p = &moduleActionProps{} if len(mm) > 0 { @@ -985,6 +1034,7 @@ func ModuleErrNotAllowedToUndelete(mm ...*moduleActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc module) recordAction(ctx context.Context, props *moduleActionProps, actionFn func(...*moduleActionProps) *moduleAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/compose/service/namespace_actions.gen.go b/server/compose/service/namespace_actions.gen.go index 107cf6dab..4df1be684 100644 --- a/server/compose/service/namespace_actions.gen.go +++ b/server/compose/service/namespace_actions.gen.go @@ -55,6 +55,7 @@ var ( // setNamespace updates namespaceActionProps's namespace // // This function is auto-generated. +// func (p *namespaceActionProps) setNamespace(namespace *types.Namespace) *namespaceActionProps { p.namespace = namespace return p @@ -63,6 +64,7 @@ func (p *namespaceActionProps) setNamespace(namespace *types.Namespace) *namespa // setChanged updates namespaceActionProps's changed // // This function is auto-generated. +// func (p *namespaceActionProps) setChanged(changed *types.Namespace) *namespaceActionProps { p.changed = changed return p @@ -71,6 +73,7 @@ func (p *namespaceActionProps) setChanged(changed *types.Namespace) *namespaceAc // setArchiveFormat updates namespaceActionProps's archiveFormat // // This function is auto-generated. +// func (p *namespaceActionProps) setArchiveFormat(archiveFormat string) *namespaceActionProps { p.archiveFormat = archiveFormat return p @@ -79,6 +82,7 @@ func (p *namespaceActionProps) setArchiveFormat(archiveFormat string) *namespace // setFilter updates namespaceActionProps's filter // // This function is auto-generated. +// func (p *namespaceActionProps) setFilter(filter *types.NamespaceFilter) *namespaceActionProps { p.filter = filter return p @@ -87,6 +91,7 @@ func (p *namespaceActionProps) setFilter(filter *types.NamespaceFilter) *namespa // Serialize converts namespaceActionProps to actionlog.Meta // // This function is auto-generated. +// func (p namespaceActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -119,6 +124,7 @@ func (p namespaceActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p namespaceActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -206,6 +212,7 @@ func (p namespaceActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *namespaceAction) String() string { var props = &namespaceActionProps{} @@ -233,6 +240,7 @@ func (e *namespaceAction) ToAction() *actionlog.Action { // NamespaceActionSearch returns "compose:namespace.search" action // // This function is auto-generated. +// func NamespaceActionSearch(props ...*namespaceActionProps) *namespaceAction { a := &namespaceAction{ timestamp: time.Now(), @@ -252,6 +260,7 @@ func NamespaceActionSearch(props ...*namespaceActionProps) *namespaceAction { // NamespaceActionLookup returns "compose:namespace.lookup" action // // This function is auto-generated. +// func NamespaceActionLookup(props ...*namespaceActionProps) *namespaceAction { a := &namespaceAction{ timestamp: time.Now(), @@ -271,6 +280,7 @@ func NamespaceActionLookup(props ...*namespaceActionProps) *namespaceAction { // NamespaceActionCreate returns "compose:namespace.create" action // // This function is auto-generated. +// func NamespaceActionCreate(props ...*namespaceActionProps) *namespaceAction { a := &namespaceAction{ timestamp: time.Now(), @@ -290,6 +300,7 @@ func NamespaceActionCreate(props ...*namespaceActionProps) *namespaceAction { // NamespaceActionUpdate returns "compose:namespace.update" action // // This function is auto-generated. +// func NamespaceActionUpdate(props ...*namespaceActionProps) *namespaceAction { a := &namespaceAction{ timestamp: time.Now(), @@ -309,6 +320,7 @@ func NamespaceActionUpdate(props ...*namespaceActionProps) *namespaceAction { // NamespaceActionClone returns "compose:namespace.clone" action // // This function is auto-generated. +// func NamespaceActionClone(props ...*namespaceActionProps) *namespaceAction { a := &namespaceAction{ timestamp: time.Now(), @@ -328,6 +340,7 @@ func NamespaceActionClone(props ...*namespaceActionProps) *namespaceAction { // NamespaceActionExport returns "compose:namespace.export" action // // This function is auto-generated. +// func NamespaceActionExport(props ...*namespaceActionProps) *namespaceAction { a := &namespaceAction{ timestamp: time.Now(), @@ -347,6 +360,7 @@ func NamespaceActionExport(props ...*namespaceActionProps) *namespaceAction { // NamespaceActionImportInit returns "compose:namespace.importInit" action // // This function is auto-generated. +// func NamespaceActionImportInit(props ...*namespaceActionProps) *namespaceAction { a := &namespaceAction{ timestamp: time.Now(), @@ -366,6 +380,7 @@ func NamespaceActionImportInit(props ...*namespaceActionProps) *namespaceAction // NamespaceActionImportRun returns "compose:namespace.importRun" action // // This function is auto-generated. +// func NamespaceActionImportRun(props ...*namespaceActionProps) *namespaceAction { a := &namespaceAction{ timestamp: time.Now(), @@ -385,6 +400,7 @@ func NamespaceActionImportRun(props ...*namespaceActionProps) *namespaceAction { // NamespaceActionDelete returns "compose:namespace.delete" action // // This function is auto-generated. +// func NamespaceActionDelete(props ...*namespaceActionProps) *namespaceAction { a := &namespaceAction{ timestamp: time.Now(), @@ -404,6 +420,7 @@ func NamespaceActionDelete(props ...*namespaceActionProps) *namespaceAction { // NamespaceActionUndelete returns "compose:namespace.undelete" action // // This function is auto-generated. +// func NamespaceActionUndelete(props ...*namespaceActionProps) *namespaceAction { a := &namespaceAction{ timestamp: time.Now(), @@ -423,6 +440,7 @@ func NamespaceActionUndelete(props ...*namespaceActionProps) *namespaceAction { // NamespaceActionReorder returns "compose:namespace.reorder" action // // This function is auto-generated. +// func NamespaceActionReorder(props ...*namespaceActionProps) *namespaceAction { a := &namespaceAction{ timestamp: time.Now(), @@ -445,7 +463,9 @@ func NamespaceActionReorder(props ...*namespaceActionProps) *namespaceAction { // NamespaceErrGeneric returns "compose:namespace.generic" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrGeneric(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -479,7 +499,9 @@ func NamespaceErrGeneric(mm ...*namespaceActionProps) *errors.Error { // NamespaceErrNotFound returns "compose:namespace.notFound" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrNotFound(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -511,7 +533,9 @@ func NamespaceErrNotFound(mm ...*namespaceActionProps) *errors.Error { // NamespaceErrInvalidID returns "compose:namespace.invalidID" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrInvalidID(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -543,7 +567,9 @@ func NamespaceErrInvalidID(mm ...*namespaceActionProps) *errors.Error { // NamespaceErrInvalidHandle returns "compose:namespace.invalidHandle" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrInvalidHandle(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -575,7 +601,9 @@ func NamespaceErrInvalidHandle(mm ...*namespaceActionProps) *errors.Error { // NamespaceErrHandleNotUnique returns "compose:namespace.handleNotUnique" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrHandleNotUnique(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -609,7 +637,9 @@ func NamespaceErrHandleNotUnique(mm ...*namespaceActionProps) *errors.Error { // NamespaceErrStaleData returns "compose:namespace.staleData" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrStaleData(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -641,7 +671,9 @@ func NamespaceErrStaleData(mm ...*namespaceActionProps) *errors.Error { // NamespaceErrUnsupportedExportFormat returns "compose:namespace.unsupportedExportFormat" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrUnsupportedExportFormat(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -675,7 +707,9 @@ func NamespaceErrUnsupportedExportFormat(mm ...*namespaceActionProps) *errors.Er // NamespaceErrUnsupportedImportFormat returns "compose:namespace.unsupportedImportFormat" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrUnsupportedImportFormat(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -709,7 +743,9 @@ func NamespaceErrUnsupportedImportFormat(mm ...*namespaceActionProps) *errors.Er // NamespaceErrImportMissingNamespace returns "compose:namespace.importMissingNamespace" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrImportMissingNamespace(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -743,7 +779,9 @@ func NamespaceErrImportMissingNamespace(mm ...*namespaceActionProps) *errors.Err // NamespaceErrImportSessionNotFound returns "compose:namespace.importSessionNotFound" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrImportSessionNotFound(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -777,7 +815,9 @@ func NamespaceErrImportSessionNotFound(mm ...*namespaceActionProps) *errors.Erro // NamespaceErrCloneMultiple returns "compose:namespace.cloneMultiple" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrCloneMultiple(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -811,7 +851,9 @@ func NamespaceErrCloneMultiple(mm ...*namespaceActionProps) *errors.Error { // NamespaceErrNotAllowedToRead returns "compose:namespace.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrNotAllowedToRead(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -845,7 +887,9 @@ func NamespaceErrNotAllowedToRead(mm ...*namespaceActionProps) *errors.Error { // NamespaceErrNotAllowedToSearch returns "compose:namespace.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrNotAllowedToSearch(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -879,7 +923,9 @@ func NamespaceErrNotAllowedToSearch(mm ...*namespaceActionProps) *errors.Error { // NamespaceErrNotAllowedToCreate returns "compose:namespace.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrNotAllowedToCreate(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -913,7 +959,9 @@ func NamespaceErrNotAllowedToCreate(mm ...*namespaceActionProps) *errors.Error { // NamespaceErrNotAllowedToUpdate returns "compose:namespace.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrNotAllowedToUpdate(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -947,7 +995,9 @@ func NamespaceErrNotAllowedToUpdate(mm ...*namespaceActionProps) *errors.Error { // NamespaceErrNotAllowedToDelete returns "compose:namespace.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrNotAllowedToDelete(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -981,7 +1031,9 @@ func NamespaceErrNotAllowedToDelete(mm ...*namespaceActionProps) *errors.Error { // NamespaceErrNotAllowedToUndelete returns "compose:namespace.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func NamespaceErrNotAllowedToUndelete(mm ...*namespaceActionProps) *errors.Error { var p = &namespaceActionProps{} if len(mm) > 0 { @@ -1021,6 +1073,7 @@ func NamespaceErrNotAllowedToUndelete(mm ...*namespaceActionProps) *errors.Error // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc namespace) recordAction(ctx context.Context, props *namespaceActionProps, actionFn func(...*namespaceActionProps) *namespaceAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/compose/service/notifications_actions.gen.go b/server/compose/service/notifications_actions.gen.go index edfa40392..b37bc1b67 100644 --- a/server/compose/service/notifications_actions.gen.go +++ b/server/compose/service/notifications_actions.gen.go @@ -56,6 +56,7 @@ var ( // setMail updates notificationActionProps's mail // // This function is auto-generated. +// func (p *notificationActionProps) setMail(mail *types.EmailNotification) *notificationActionProps { p.mail = mail return p @@ -64,6 +65,7 @@ func (p *notificationActionProps) setMail(mail *types.EmailNotification) *notifi // setRecipient updates notificationActionProps's recipient // // This function is auto-generated. +// func (p *notificationActionProps) setRecipient(recipient string) *notificationActionProps { p.recipient = recipient return p @@ -72,6 +74,7 @@ func (p *notificationActionProps) setRecipient(recipient string) *notificationAc // setAttachmentURL updates notificationActionProps's attachmentURL // // This function is auto-generated. +// func (p *notificationActionProps) setAttachmentURL(attachmentURL string) *notificationActionProps { p.attachmentURL = attachmentURL return p @@ -80,6 +83,7 @@ func (p *notificationActionProps) setAttachmentURL(attachmentURL string) *notifi // setAttachmentSize updates notificationActionProps's attachmentSize // // This function is auto-generated. +// func (p *notificationActionProps) setAttachmentSize(attachmentSize int64) *notificationActionProps { p.attachmentSize = attachmentSize return p @@ -88,6 +92,7 @@ func (p *notificationActionProps) setAttachmentSize(attachmentSize int64) *notif // setAttachmentType updates notificationActionProps's attachmentType // // This function is auto-generated. +// func (p *notificationActionProps) setAttachmentType(attachmentType string) *notificationActionProps { p.attachmentType = attachmentType return p @@ -96,6 +101,7 @@ func (p *notificationActionProps) setAttachmentType(attachmentType string) *noti // Serialize converts notificationActionProps to actionlog.Meta // // This function is auto-generated. +// func (p notificationActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -121,6 +127,7 @@ func (p notificationActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p notificationActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -179,6 +186,7 @@ func (p notificationActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *notificationAction) String() string { var props = ¬ificationActionProps{} @@ -206,6 +214,7 @@ func (e *notificationAction) ToAction() *actionlog.Action { // NotificationActionSend returns "compose:notification.send" action // // This function is auto-generated. +// func NotificationActionSend(props ...*notificationActionProps) *notificationAction { a := ¬ificationAction{ timestamp: time.Now(), @@ -225,6 +234,7 @@ func NotificationActionSend(props ...*notificationActionProps) *notificationActi // NotificationActionAttachmentDownload returns "compose:notification.attachmentDownload" action // // This function is auto-generated. +// func NotificationActionAttachmentDownload(props ...*notificationActionProps) *notificationAction { a := ¬ificationAction{ timestamp: time.Now(), @@ -247,7 +257,9 @@ func NotificationActionAttachmentDownload(props ...*notificationActionProps) *no // NotificationErrGeneric returns "compose:notification.generic" as *errors.Error // +// // This function is auto-generated. +// func NotificationErrGeneric(mm ...*notificationActionProps) *errors.Error { var p = ¬ificationActionProps{} if len(mm) > 0 { @@ -281,7 +293,9 @@ func NotificationErrGeneric(mm ...*notificationActionProps) *errors.Error { // NotificationErrFailedToLoadUser returns "compose:notification.failedToLoadUser" as *errors.Error // +// // This function is auto-generated. +// func NotificationErrFailedToLoadUser(mm ...*notificationActionProps) *errors.Error { var p = ¬ificationActionProps{} if len(mm) > 0 { @@ -313,7 +327,9 @@ func NotificationErrFailedToLoadUser(mm ...*notificationActionProps) *errors.Err // NotificationErrInvalidReceipientFormat returns "compose:notification.invalidReceipientFormat" as *errors.Error // +// // This function is auto-generated. +// func NotificationErrInvalidReceipientFormat(mm ...*notificationActionProps) *errors.Error { var p = ¬ificationActionProps{} if len(mm) > 0 { @@ -345,7 +361,9 @@ func NotificationErrInvalidReceipientFormat(mm ...*notificationActionProps) *err // NotificationErrNoRecipients returns "compose:notification.noRecipients" as *errors.Error // +// // This function is auto-generated. +// func NotificationErrNoRecipients(mm ...*notificationActionProps) *errors.Error { var p = ¬ificationActionProps{} if len(mm) > 0 { @@ -377,7 +395,9 @@ func NotificationErrNoRecipients(mm ...*notificationActionProps) *errors.Error { // NotificationErrFailedToDownloadAttachment returns "compose:notification.failedToDownloadAttachment" as *errors.Error // +// // This function is auto-generated. +// func NotificationErrFailedToDownloadAttachment(mm ...*notificationActionProps) *errors.Error { var p = ¬ificationActionProps{} if len(mm) > 0 { @@ -415,6 +435,7 @@ func NotificationErrFailedToDownloadAttachment(mm ...*notificationActionProps) * // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc notification) recordAction(ctx context.Context, props *notificationActionProps, actionFn func(...*notificationActionProps) *notificationAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/compose/service/page_actions.gen.go b/server/compose/service/page_actions.gen.go index 1ca59474b..24c3927be 100644 --- a/server/compose/service/page_actions.gen.go +++ b/server/compose/service/page_actions.gen.go @@ -55,6 +55,7 @@ var ( // setPage updates pageActionProps's page // // This function is auto-generated. +// func (p *pageActionProps) setPage(page *types.Page) *pageActionProps { p.page = page return p @@ -63,6 +64,7 @@ func (p *pageActionProps) setPage(page *types.Page) *pageActionProps { // setChanged updates pageActionProps's changed // // This function is auto-generated. +// func (p *pageActionProps) setChanged(changed *types.Page) *pageActionProps { p.changed = changed return p @@ -71,6 +73,7 @@ func (p *pageActionProps) setChanged(changed *types.Page) *pageActionProps { // setFilter updates pageActionProps's filter // // This function is auto-generated. +// func (p *pageActionProps) setFilter(filter *types.PageFilter) *pageActionProps { p.filter = filter return p @@ -79,6 +82,7 @@ func (p *pageActionProps) setFilter(filter *types.PageFilter) *pageActionProps { // setNamespace updates pageActionProps's namespace // // This function is auto-generated. +// func (p *pageActionProps) setNamespace(namespace *types.Namespace) *pageActionProps { p.namespace = namespace return p @@ -87,6 +91,7 @@ func (p *pageActionProps) setNamespace(namespace *types.Namespace) *pageActionPr // Serialize converts pageActionProps to actionlog.Meta // // This function is auto-generated. +// func (p pageActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -131,6 +136,7 @@ func (p pageActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p pageActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -249,6 +255,7 @@ func (p pageActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *pageAction) String() string { var props = &pageActionProps{} @@ -276,6 +283,7 @@ func (e *pageAction) ToAction() *actionlog.Action { // PageActionSearch returns "compose:page.search" action // // This function is auto-generated. +// func PageActionSearch(props ...*pageActionProps) *pageAction { a := &pageAction{ timestamp: time.Now(), @@ -295,6 +303,7 @@ func PageActionSearch(props ...*pageActionProps) *pageAction { // PageActionLookup returns "compose:page.lookup" action // // This function is auto-generated. +// func PageActionLookup(props ...*pageActionProps) *pageAction { a := &pageAction{ timestamp: time.Now(), @@ -314,6 +323,7 @@ func PageActionLookup(props ...*pageActionProps) *pageAction { // PageActionCreate returns "compose:page.create" action // // This function is auto-generated. +// func PageActionCreate(props ...*pageActionProps) *pageAction { a := &pageAction{ timestamp: time.Now(), @@ -333,6 +343,7 @@ func PageActionCreate(props ...*pageActionProps) *pageAction { // PageActionUpdate returns "compose:page.update" action // // This function is auto-generated. +// func PageActionUpdate(props ...*pageActionProps) *pageAction { a := &pageAction{ timestamp: time.Now(), @@ -352,6 +363,7 @@ func PageActionUpdate(props ...*pageActionProps) *pageAction { // PageActionDelete returns "compose:page.delete" action // // This function is auto-generated. +// func PageActionDelete(props ...*pageActionProps) *pageAction { a := &pageAction{ timestamp: time.Now(), @@ -371,6 +383,7 @@ func PageActionDelete(props ...*pageActionProps) *pageAction { // PageActionUndelete returns "compose:page.undelete" action // // This function is auto-generated. +// func PageActionUndelete(props ...*pageActionProps) *pageAction { a := &pageAction{ timestamp: time.Now(), @@ -390,6 +403,7 @@ func PageActionUndelete(props ...*pageActionProps) *pageAction { // PageActionReorder returns "compose:page.reorder" action // // This function is auto-generated. +// func PageActionReorder(props ...*pageActionProps) *pageAction { a := &pageAction{ timestamp: time.Now(), @@ -412,7 +426,9 @@ func PageActionReorder(props ...*pageActionProps) *pageAction { // PageErrGeneric returns "compose:page.generic" as *errors.Error // +// // This function is auto-generated. +// func PageErrGeneric(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -446,7 +462,9 @@ func PageErrGeneric(mm ...*pageActionProps) *errors.Error { // PageErrNotFound returns "compose:page.notFound" as *errors.Error // +// // This function is auto-generated. +// func PageErrNotFound(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -478,7 +496,9 @@ func PageErrNotFound(mm ...*pageActionProps) *errors.Error { // PageErrNamespaceNotFound returns "compose:page.namespaceNotFound" as *errors.Error // +// // This function is auto-generated. +// func PageErrNamespaceNotFound(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -510,7 +530,9 @@ func PageErrNamespaceNotFound(mm ...*pageActionProps) *errors.Error { // PageErrModuleNotFound returns "compose:page.moduleNotFound" as *errors.Error // +// // This function is auto-generated. +// func PageErrModuleNotFound(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -542,7 +564,9 @@ func PageErrModuleNotFound(mm ...*pageActionProps) *errors.Error { // PageErrInvalidID returns "compose:page.invalidID" as *errors.Error // +// // This function is auto-generated. +// func PageErrInvalidID(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -574,7 +598,9 @@ func PageErrInvalidID(mm ...*pageActionProps) *errors.Error { // PageErrInvalidHandle returns "compose:page.invalidHandle" as *errors.Error // +// // This function is auto-generated. +// func PageErrInvalidHandle(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -606,7 +632,9 @@ func PageErrInvalidHandle(mm ...*pageActionProps) *errors.Error { // PageErrHandleNotUnique returns "compose:page.handleNotUnique" as *errors.Error // +// // This function is auto-generated. +// func PageErrHandleNotUnique(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -640,7 +668,9 @@ func PageErrHandleNotUnique(mm ...*pageActionProps) *errors.Error { // PageErrStaleData returns "compose:page.staleData" as *errors.Error // +// // This function is auto-generated. +// func PageErrStaleData(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -672,7 +702,9 @@ func PageErrStaleData(mm ...*pageActionProps) *errors.Error { // PageErrInvalidNamespaceID returns "compose:page.invalidNamespaceID" as *errors.Error // +// // This function is auto-generated. +// func PageErrInvalidNamespaceID(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -704,7 +736,9 @@ func PageErrInvalidNamespaceID(mm ...*pageActionProps) *errors.Error { // PageErrDeleteAbortedForPageWithSubpages returns "compose:page.deleteAbortedForPageWithSubpages" as *errors.Error // +// // This function is auto-generated. +// func PageErrDeleteAbortedForPageWithSubpages(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -736,7 +770,9 @@ func PageErrDeleteAbortedForPageWithSubpages(mm ...*pageActionProps) *errors.Err // PageErrUnknownDeleteStrategy returns "compose:page.unknownDeleteStrategy" as *errors.Error // +// // This function is auto-generated. +// func PageErrUnknownDeleteStrategy(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -768,7 +804,9 @@ func PageErrUnknownDeleteStrategy(mm ...*pageActionProps) *errors.Error { // PageErrNotAllowedToRead returns "compose:page.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func PageErrNotAllowedToRead(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -802,7 +840,9 @@ func PageErrNotAllowedToRead(mm ...*pageActionProps) *errors.Error { // PageErrNotAllowedToSearch returns "compose:page.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func PageErrNotAllowedToSearch(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -836,7 +876,9 @@ func PageErrNotAllowedToSearch(mm ...*pageActionProps) *errors.Error { // PageErrNotAllowedToReadNamespace returns "compose:page.notAllowedToReadNamespace" as *errors.Error // +// // This function is auto-generated. +// func PageErrNotAllowedToReadNamespace(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -870,7 +912,9 @@ func PageErrNotAllowedToReadNamespace(mm ...*pageActionProps) *errors.Error { // PageErrNotAllowedToListPages returns "compose:page.notAllowedToListPages" as *errors.Error // +// // This function is auto-generated. +// func PageErrNotAllowedToListPages(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -904,7 +948,9 @@ func PageErrNotAllowedToListPages(mm ...*pageActionProps) *errors.Error { // PageErrNotAllowedToCreate returns "compose:page.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func PageErrNotAllowedToCreate(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -938,7 +984,9 @@ func PageErrNotAllowedToCreate(mm ...*pageActionProps) *errors.Error { // PageErrNotAllowedToUpdate returns "compose:page.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func PageErrNotAllowedToUpdate(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -972,7 +1020,9 @@ func PageErrNotAllowedToUpdate(mm ...*pageActionProps) *errors.Error { // PageErrNotAllowedToDelete returns "compose:page.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func PageErrNotAllowedToDelete(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -1006,7 +1056,9 @@ func PageErrNotAllowedToDelete(mm ...*pageActionProps) *errors.Error { // PageErrNotAllowedToUndelete returns "compose:page.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func PageErrNotAllowedToUndelete(mm ...*pageActionProps) *errors.Error { var p = &pageActionProps{} if len(mm) > 0 { @@ -1046,6 +1098,7 @@ func PageErrNotAllowedToUndelete(mm ...*pageActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc page) recordAction(ctx context.Context, props *pageActionProps, actionFn func(...*pageActionProps) *pageAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/compose/service/page_layout.go b/server/compose/service/page_layout.go index 213ccd5ff..88722d10b 100644 --- a/server/compose/service/page_layout.go +++ b/server/compose/service/page_layout.go @@ -230,6 +230,32 @@ func (svc pageLayout) Create(ctx context.Context, new *types.PageLayout) (*types return new, svc.recordAction(ctx, aProps, PageLayoutActionCreate, err) } +func (svc pageLayout) Reorder(ctx context.Context, namespaceID, pageID uint64, pageLayoutIDs []uint64) (err error) { + var ( + aProps = &pageLayoutActionProps{pageLayout: &types.PageLayout{ID: pageID}} + p *types.Page + ) + + err = store.Tx(ctx, svc.store, func(ctx context.Context, s store.Storer) error { + // Get the page + if p, err = store.LookupComposePageByID(ctx, svc.store, pageID); errors.IsNotFound(err) { + return PageLayoutErrNotFound() + } else if err != nil { + return err + } + _ = p + + // if !svc.ac.CanUpdatePageLayout(ctx, p) { + // return PageLayoutErrNotAllowedToUpdate() + // } + + return store.ReorderComposePageLayouts(ctx, s, namespaceID, pageID, pageLayoutIDs) + }) + + return svc.recordAction(ctx, aProps, PageLayoutActionReorder, err) + +} + func (svc pageLayout) Update(ctx context.Context, upd *types.PageLayout) (c *types.PageLayout, err error) { err = store.Tx(ctx, svc.store, func(ctx context.Context, s store.Storer) (err error) { ns, res, err := loadPageLayoutCombo(ctx, s, upd.NamespaceID, upd.PageID, upd.ID) @@ -384,12 +410,6 @@ func (svc pageLayout) uniqueCheck(ctx context.Context, p *types.PageLayout) (err } } - if p.ModuleID > 0 { - if e, _ := store.LookupComposePageLayoutByNamespaceIDModuleID(ctx, svc.store, p.NamespaceID, p.ModuleID); e != nil && e.ID != p.ID { - return PageLayoutErrModuleNotFound() - } - } - return nil } @@ -439,11 +459,6 @@ func (svc pageLayout) handleUpdate(ctx context.Context, upd *types.PageLayout) p changes |= pageLayoutChanged } - if res.ModuleID != upd.ModuleID { - res.ModuleID = upd.ModuleID - changes |= pageLayoutChanged - } - if !reflect.DeepEqual(res.Config, upd.Config) { res.Config = upd.Config changes |= pageLayoutChanged diff --git a/server/compose/service/page_layout_actions.gen.go b/server/compose/service/page_layout_actions.gen.go index e530df2b8..8c2c200d4 100644 --- a/server/compose/service/page_layout_actions.gen.go +++ b/server/compose/service/page_layout_actions.gen.go @@ -55,6 +55,7 @@ var ( // setPageLayout updates pageLayoutActionProps's pageLayout // // This function is auto-generated. +// func (p *pageLayoutActionProps) setPageLayout(pageLayout *types.PageLayout) *pageLayoutActionProps { p.pageLayout = pageLayout return p @@ -63,6 +64,7 @@ func (p *pageLayoutActionProps) setPageLayout(pageLayout *types.PageLayout) *pag // setChanged updates pageLayoutActionProps's changed // // This function is auto-generated. +// func (p *pageLayoutActionProps) setChanged(changed *types.PageLayout) *pageLayoutActionProps { p.changed = changed return p @@ -71,6 +73,7 @@ func (p *pageLayoutActionProps) setChanged(changed *types.PageLayout) *pageLayou // setFilter updates pageLayoutActionProps's filter // // This function is auto-generated. +// func (p *pageLayoutActionProps) setFilter(filter *types.PageLayoutFilter) *pageLayoutActionProps { p.filter = filter return p @@ -79,6 +82,7 @@ func (p *pageLayoutActionProps) setFilter(filter *types.PageLayoutFilter) *pageL // setNamespace updates pageLayoutActionProps's namespace // // This function is auto-generated. +// func (p *pageLayoutActionProps) setNamespace(namespace *types.Namespace) *pageLayoutActionProps { p.namespace = namespace return p @@ -87,6 +91,7 @@ func (p *pageLayoutActionProps) setNamespace(namespace *types.Namespace) *pageLa // Serialize converts pageLayoutActionProps to actionlog.Meta // // This function is auto-generated. +// func (p pageLayoutActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -96,13 +101,11 @@ func (p pageLayoutActionProps) Serialize() actionlog.Meta { m.Set("pageLayout.handle", p.pageLayout.Handle, true) m.Set("pageLayout.ID", p.pageLayout.ID, true) m.Set("pageLayout.namespaceID", p.pageLayout.NamespaceID, true) - m.Set("pageLayout.moduleID", p.pageLayout.ModuleID, true) } if p.changed != nil { m.Set("changed.handle", p.changed.Handle, true) m.Set("changed.ID", p.changed.ID, true) m.Set("changed.namespaceID", p.changed.NamespaceID, true) - m.Set("changed.moduleID", p.changed.ModuleID, true) m.Set("changed.blocks", p.changed.Blocks, true) } if p.filter != nil { @@ -124,6 +127,7 @@ func (p pageLayoutActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p pageLayoutActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -154,13 +158,11 @@ func (p pageLayoutActionProps) Format(in string, err error) string { p.pageLayout.Handle, p.pageLayout.ID, p.pageLayout.NamespaceID, - p.pageLayout.ModuleID, ), ) pairs = append(pairs, "{{pageLayout.handle}}", fns(p.pageLayout.Handle)) pairs = append(pairs, "{{pageLayout.ID}}", fns(p.pageLayout.ID)) pairs = append(pairs, "{{pageLayout.namespaceID}}", fns(p.pageLayout.NamespaceID)) - pairs = append(pairs, "{{pageLayout.moduleID}}", fns(p.pageLayout.ModuleID)) } if p.changed != nil { @@ -172,14 +174,12 @@ func (p pageLayoutActionProps) Format(in string, err error) string { p.changed.Handle, p.changed.ID, p.changed.NamespaceID, - p.changed.ModuleID, p.changed.Blocks, ), ) pairs = append(pairs, "{{changed.handle}}", fns(p.changed.Handle)) pairs = append(pairs, "{{changed.ID}}", fns(p.changed.ID)) pairs = append(pairs, "{{changed.namespaceID}}", fns(p.changed.NamespaceID)) - pairs = append(pairs, "{{changed.moduleID}}", fns(p.changed.ModuleID)) pairs = append(pairs, "{{changed.blocks}}", fns(p.changed.Blocks)) } @@ -228,6 +228,7 @@ func (p pageLayoutActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *pageLayoutAction) String() string { var props = &pageLayoutActionProps{} @@ -255,6 +256,7 @@ func (e *pageLayoutAction) ToAction() *actionlog.Action { // PageLayoutActionSearch returns "compose:page-layout.search" action // // This function is auto-generated. +// func PageLayoutActionSearch(props ...*pageLayoutActionProps) *pageLayoutAction { a := &pageLayoutAction{ timestamp: time.Now(), @@ -274,6 +276,7 @@ func PageLayoutActionSearch(props ...*pageLayoutActionProps) *pageLayoutAction { // PageLayoutActionLookup returns "compose:page-layout.lookup" action // // This function is auto-generated. +// func PageLayoutActionLookup(props ...*pageLayoutActionProps) *pageLayoutAction { a := &pageLayoutAction{ timestamp: time.Now(), @@ -293,6 +296,7 @@ func PageLayoutActionLookup(props ...*pageLayoutActionProps) *pageLayoutAction { // PageLayoutActionCreate returns "compose:page-layout.create" action // // This function is auto-generated. +// func PageLayoutActionCreate(props ...*pageLayoutActionProps) *pageLayoutAction { a := &pageLayoutAction{ timestamp: time.Now(), @@ -312,6 +316,7 @@ func PageLayoutActionCreate(props ...*pageLayoutActionProps) *pageLayoutAction { // PageLayoutActionUpdate returns "compose:page-layout.update" action // // This function is auto-generated. +// func PageLayoutActionUpdate(props ...*pageLayoutActionProps) *pageLayoutAction { a := &pageLayoutAction{ timestamp: time.Now(), @@ -328,9 +333,30 @@ func PageLayoutActionUpdate(props ...*pageLayoutActionProps) *pageLayoutAction { return a } +// PageLayoutActionReorder returns "compose:page-layout.reorder" action +// +// This function is auto-generated. +// +func PageLayoutActionReorder(props ...*pageLayoutActionProps) *pageLayoutAction { + a := &pageLayoutAction{ + timestamp: time.Now(), + resource: "compose:page-layout", + action: "reorder", + log: "reordered {{pageLayout}}", + severity: actionlog.Notice, + } + + if len(props) > 0 { + a.props = props[0] + } + + return a +} + // PageLayoutActionDelete returns "compose:page-layout.delete" action // // This function is auto-generated. +// func PageLayoutActionDelete(props ...*pageLayoutActionProps) *pageLayoutAction { a := &pageLayoutAction{ timestamp: time.Now(), @@ -350,6 +376,7 @@ func PageLayoutActionDelete(props ...*pageLayoutActionProps) *pageLayoutAction { // PageLayoutActionUndelete returns "compose:page-layout.undelete" action // // This function is auto-generated. +// func PageLayoutActionUndelete(props ...*pageLayoutActionProps) *pageLayoutAction { a := &pageLayoutAction{ timestamp: time.Now(), @@ -372,7 +399,9 @@ func PageLayoutActionUndelete(props ...*pageLayoutActionProps) *pageLayoutAction // PageLayoutErrGeneric returns "compose:page-layout.generic" as *errors.Error // +// // This function is auto-generated. +// func PageLayoutErrGeneric(mm ...*pageLayoutActionProps) *errors.Error { var p = &pageLayoutActionProps{} if len(mm) > 0 { @@ -406,7 +435,9 @@ func PageLayoutErrGeneric(mm ...*pageLayoutActionProps) *errors.Error { // PageLayoutErrNotFound returns "compose:page-layout.notFound" as *errors.Error // +// // This function is auto-generated. +// func PageLayoutErrNotFound(mm ...*pageLayoutActionProps) *errors.Error { var p = &pageLayoutActionProps{} if len(mm) > 0 { @@ -438,7 +469,9 @@ func PageLayoutErrNotFound(mm ...*pageLayoutActionProps) *errors.Error { // PageLayoutErrNamespaceNotFound returns "compose:page-layout.namespaceNotFound" as *errors.Error // +// // This function is auto-generated. +// func PageLayoutErrNamespaceNotFound(mm ...*pageLayoutActionProps) *errors.Error { var p = &pageLayoutActionProps{} if len(mm) > 0 { @@ -470,7 +503,9 @@ func PageLayoutErrNamespaceNotFound(mm ...*pageLayoutActionProps) *errors.Error // PageLayoutErrModuleNotFound returns "compose:page-layout.moduleNotFound" as *errors.Error // +// // This function is auto-generated. +// func PageLayoutErrModuleNotFound(mm ...*pageLayoutActionProps) *errors.Error { var p = &pageLayoutActionProps{} if len(mm) > 0 { @@ -502,7 +537,9 @@ func PageLayoutErrModuleNotFound(mm ...*pageLayoutActionProps) *errors.Error { // PageLayoutErrInvalidID returns "compose:page-layout.invalidID" as *errors.Error // +// // This function is auto-generated. +// func PageLayoutErrInvalidID(mm ...*pageLayoutActionProps) *errors.Error { var p = &pageLayoutActionProps{} if len(mm) > 0 { @@ -534,7 +571,9 @@ func PageLayoutErrInvalidID(mm ...*pageLayoutActionProps) *errors.Error { // PageLayoutErrInvalidHandle returns "compose:page-layout.invalidHandle" as *errors.Error // +// // This function is auto-generated. +// func PageLayoutErrInvalidHandle(mm ...*pageLayoutActionProps) *errors.Error { var p = &pageLayoutActionProps{} if len(mm) > 0 { @@ -566,7 +605,9 @@ func PageLayoutErrInvalidHandle(mm ...*pageLayoutActionProps) *errors.Error { // PageLayoutErrHandleNotUnique returns "compose:page-layout.handleNotUnique" as *errors.Error // +// // This function is auto-generated. +// func PageLayoutErrHandleNotUnique(mm ...*pageLayoutActionProps) *errors.Error { var p = &pageLayoutActionProps{} if len(mm) > 0 { @@ -600,7 +641,9 @@ func PageLayoutErrHandleNotUnique(mm ...*pageLayoutActionProps) *errors.Error { // PageLayoutErrStaleData returns "compose:page-layout.staleData" as *errors.Error // +// // This function is auto-generated. +// func PageLayoutErrStaleData(mm ...*pageLayoutActionProps) *errors.Error { var p = &pageLayoutActionProps{} if len(mm) > 0 { @@ -632,7 +675,9 @@ func PageLayoutErrStaleData(mm ...*pageLayoutActionProps) *errors.Error { // PageLayoutErrInvalidNamespaceID returns "compose:page-layout.invalidNamespaceID" as *errors.Error // +// // This function is auto-generated. +// func PageLayoutErrInvalidNamespaceID(mm ...*pageLayoutActionProps) *errors.Error { var p = &pageLayoutActionProps{} if len(mm) > 0 { @@ -670,6 +715,7 @@ func PageLayoutErrInvalidNamespaceID(mm ...*pageLayoutActionProps) *errors.Error // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc pageLayout) recordAction(ctx context.Context, props *pageLayoutActionProps, actionFn func(...*pageLayoutActionProps) *pageLayoutAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/compose/service/page_layout_actions.yaml b/server/compose/service/page_layout_actions.yaml index d0d35f520..3a01f23ca 100644 --- a/server/compose/service/page_layout_actions.yaml +++ b/server/compose/service/page_layout_actions.yaml @@ -15,10 +15,10 @@ import: props: - name: pageLayout type: "*types.PageLayout" - fields: [ handle, ID, namespaceID, moduleID ] + fields: [ handle, ID, namespaceID ] - name: changed type: "*types.PageLayout" - fields: [ handle, ID, namespaceID, moduleID, blocks ] + fields: [ handle, ID, namespaceID, blocks ] - name: filter type: "*types.PageLayoutFilter" fields: [ query, handle, primary, namespaceID, sort, limit ] @@ -41,6 +41,9 @@ actions: - action: update log: "updated {{pageLayout}}" + - action: reorder + log: "reordered {{pageLayout}}" + - action: delete log: "deleted {{pageLayout}}" diff --git a/server/compose/service/record_actions.gen.go b/server/compose/service/record_actions.gen.go index e1ccd3dc2..10e48f16c 100644 --- a/server/compose/service/record_actions.gen.go +++ b/server/compose/service/record_actions.gen.go @@ -62,6 +62,7 @@ var ( // setRecord updates recordActionProps's record // // This function is auto-generated. +// func (p *recordActionProps) setRecord(record *types.Record) *recordActionProps { p.record = record return p @@ -70,6 +71,7 @@ func (p *recordActionProps) setRecord(record *types.Record) *recordActionProps { // setChanged updates recordActionProps's changed // // This function is auto-generated. +// func (p *recordActionProps) setChanged(changed *types.Record) *recordActionProps { p.changed = changed return p @@ -78,6 +80,7 @@ func (p *recordActionProps) setChanged(changed *types.Record) *recordActionProps // setFilter updates recordActionProps's filter // // This function is auto-generated. +// func (p *recordActionProps) setFilter(filter *types.RecordFilter) *recordActionProps { p.filter = filter return p @@ -86,6 +89,7 @@ func (p *recordActionProps) setFilter(filter *types.RecordFilter) *recordActionP // setNamespace updates recordActionProps's namespace // // This function is auto-generated. +// func (p *recordActionProps) setNamespace(namespace *types.Namespace) *recordActionProps { p.namespace = namespace return p @@ -94,6 +98,7 @@ func (p *recordActionProps) setNamespace(namespace *types.Namespace) *recordActi // setModule updates recordActionProps's module // // This function is auto-generated. +// func (p *recordActionProps) setModule(module *types.Module) *recordActionProps { p.module = module return p @@ -102,6 +107,7 @@ func (p *recordActionProps) setModule(module *types.Module) *recordActionProps { // setBulkOperation updates recordActionProps's bulkOperation // // This function is auto-generated. +// func (p *recordActionProps) setBulkOperation(bulkOperation string) *recordActionProps { p.bulkOperation = bulkOperation return p @@ -110,6 +116,7 @@ func (p *recordActionProps) setBulkOperation(bulkOperation string) *recordAction // setField updates recordActionProps's field // // This function is auto-generated. +// func (p *recordActionProps) setField(field string) *recordActionProps { p.field = field return p @@ -118,6 +125,7 @@ func (p *recordActionProps) setField(field string) *recordActionProps { // setPositionField updates recordActionProps's positionField // // This function is auto-generated. +// func (p *recordActionProps) setPositionField(positionField *types.ModuleField) *recordActionProps { p.positionField = positionField return p @@ -126,6 +134,7 @@ func (p *recordActionProps) setPositionField(positionField *types.ModuleField) * // setGroupField updates recordActionProps's groupField // // This function is auto-generated. +// func (p *recordActionProps) setGroupField(groupField *types.ModuleField) *recordActionProps { p.groupField = groupField return p @@ -134,6 +143,7 @@ func (p *recordActionProps) setGroupField(groupField *types.ModuleField) *record // setValue updates recordActionProps's value // // This function is auto-generated. +// func (p *recordActionProps) setValue(value string) *recordActionProps { p.value = value return p @@ -142,6 +152,7 @@ func (p *recordActionProps) setValue(value string) *recordActionProps { // setValueErrors updates recordActionProps's valueErrors // // This function is auto-generated. +// func (p *recordActionProps) setValueErrors(valueErrors *types.RecordValueErrorSet) *recordActionProps { p.valueErrors = valueErrors return p @@ -150,6 +161,7 @@ func (p *recordActionProps) setValueErrors(valueErrors *types.RecordValueErrorSe // Serialize converts recordActionProps to actionlog.Meta // // This function is auto-generated. +// func (p recordActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -207,6 +219,7 @@ func (p recordActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p recordActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -372,6 +385,7 @@ func (p recordActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *recordAction) String() string { var props = &recordActionProps{} @@ -399,6 +413,7 @@ func (e *recordAction) ToAction() *actionlog.Action { // RecordActionSearch returns "compose:record.search" action // // This function is auto-generated. +// func RecordActionSearch(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -418,6 +433,7 @@ func RecordActionSearch(props ...*recordActionProps) *recordAction { // RecordActionSearchSensitive returns "compose:record.searchSensitive" action // // This function is auto-generated. +// func RecordActionSearchSensitive(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -437,6 +453,7 @@ func RecordActionSearchSensitive(props ...*recordActionProps) *recordAction { // RecordActionLookup returns "compose:record.lookup" action // // This function is auto-generated. +// func RecordActionLookup(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -456,6 +473,7 @@ func RecordActionLookup(props ...*recordActionProps) *recordAction { // RecordActionReport returns "compose:record.report" action // // This function is auto-generated. +// func RecordActionReport(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -475,6 +493,7 @@ func RecordActionReport(props ...*recordActionProps) *recordAction { // RecordActionBulk returns "compose:record.bulk" action // // This function is auto-generated. +// func RecordActionBulk(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -494,6 +513,7 @@ func RecordActionBulk(props ...*recordActionProps) *recordAction { // RecordActionCreate returns "compose:record.create" action // // This function is auto-generated. +// func RecordActionCreate(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -513,6 +533,7 @@ func RecordActionCreate(props ...*recordActionProps) *recordAction { // RecordActionUpdate returns "compose:record.update" action // // This function is auto-generated. +// func RecordActionUpdate(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -532,6 +553,7 @@ func RecordActionUpdate(props ...*recordActionProps) *recordAction { // RecordActionDelete returns "compose:record.delete" action // // This function is auto-generated. +// func RecordActionDelete(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -551,6 +573,7 @@ func RecordActionDelete(props ...*recordActionProps) *recordAction { // RecordActionPatch returns "compose:record.patch" action // // This function is auto-generated. +// func RecordActionPatch(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -570,6 +593,7 @@ func RecordActionPatch(props ...*recordActionProps) *recordAction { // RecordActionUndelete returns "compose:record.undelete" action // // This function is auto-generated. +// func RecordActionUndelete(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -589,6 +613,7 @@ func RecordActionUndelete(props ...*recordActionProps) *recordAction { // RecordActionImport returns "compose:record.import" action // // This function is auto-generated. +// func RecordActionImport(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -608,6 +633,7 @@ func RecordActionImport(props ...*recordActionProps) *recordAction { // RecordActionSearchRevisions returns "compose:record.searchRevisions" action // // This function is auto-generated. +// func RecordActionSearchRevisions(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -627,6 +653,7 @@ func RecordActionSearchRevisions(props ...*recordActionProps) *recordAction { // RecordActionExport returns "compose:record.export" action // // This function is auto-generated. +// func RecordActionExport(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -646,6 +673,7 @@ func RecordActionExport(props ...*recordActionProps) *recordAction { // RecordActionOrganize returns "compose:record.organize" action // // This function is auto-generated. +// func RecordActionOrganize(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -665,6 +693,7 @@ func RecordActionOrganize(props ...*recordActionProps) *recordAction { // RecordActionIteratorInvoked returns "compose:record.iteratorInvoked" action // // This function is auto-generated. +// func RecordActionIteratorInvoked(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -684,6 +713,7 @@ func RecordActionIteratorInvoked(props ...*recordActionProps) *recordAction { // RecordActionIteratorIteration returns "compose:record.iteratorIteration" action // // This function is auto-generated. +// func RecordActionIteratorIteration(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -703,6 +733,7 @@ func RecordActionIteratorIteration(props ...*recordActionProps) *recordAction { // RecordActionIteratorClone returns "compose:record.iteratorClone" action // // This function is auto-generated. +// func RecordActionIteratorClone(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -722,6 +753,7 @@ func RecordActionIteratorClone(props ...*recordActionProps) *recordAction { // RecordActionIteratorUpdate returns "compose:record.iteratorUpdate" action // // This function is auto-generated. +// func RecordActionIteratorUpdate(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -741,6 +773,7 @@ func RecordActionIteratorUpdate(props ...*recordActionProps) *recordAction { // RecordActionIteratorDelete returns "compose:record.iteratorDelete" action // // This function is auto-generated. +// func RecordActionIteratorDelete(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -760,6 +793,7 @@ func RecordActionIteratorDelete(props ...*recordActionProps) *recordAction { // RecordActionIteratorUndelete returns "compose:record.iteratorUndelete" action // // This function is auto-generated. +// func RecordActionIteratorUndelete(props ...*recordActionProps) *recordAction { a := &recordAction{ timestamp: time.Now(), @@ -782,7 +816,9 @@ func RecordActionIteratorUndelete(props ...*recordActionProps) *recordAction { // RecordErrGeneric returns "compose:record.generic" as *errors.Error // +// // This function is auto-generated. +// func RecordErrGeneric(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -816,7 +852,9 @@ func RecordErrGeneric(mm ...*recordActionProps) *errors.Error { // RecordErrNotFound returns "compose:record.notFound" as *errors.Error // +// // This function is auto-generated. +// func RecordErrNotFound(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -848,7 +886,9 @@ func RecordErrNotFound(mm ...*recordActionProps) *errors.Error { // RecordErrNamespaceNotFound returns "compose:record.namespaceNotFound" as *errors.Error // +// // This function is auto-generated. +// func RecordErrNamespaceNotFound(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -880,7 +920,9 @@ func RecordErrNamespaceNotFound(mm ...*recordActionProps) *errors.Error { // RecordErrModuleNotFoundModule returns "compose:record.moduleNotFoundModule" as *errors.Error // +// // This function is auto-generated. +// func RecordErrModuleNotFoundModule(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -912,7 +954,9 @@ func RecordErrModuleNotFoundModule(mm ...*recordActionProps) *errors.Error { // RecordErrInvalidID returns "compose:record.invalidID" as *errors.Error // +// // This function is auto-generated. +// func RecordErrInvalidID(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -944,7 +988,9 @@ func RecordErrInvalidID(mm ...*recordActionProps) *errors.Error { // RecordErrInvalidNamespaceID returns "compose:record.invalidNamespaceID" as *errors.Error // +// // This function is auto-generated. +// func RecordErrInvalidNamespaceID(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -976,7 +1022,9 @@ func RecordErrInvalidNamespaceID(mm ...*recordActionProps) *errors.Error { // RecordErrInvalidModuleID returns "compose:record.invalidModuleID" as *errors.Error // +// // This function is auto-generated. +// func RecordErrInvalidModuleID(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1008,7 +1056,9 @@ func RecordErrInvalidModuleID(mm ...*recordActionProps) *errors.Error { // RecordErrStaleData returns "compose:record.staleData" as *errors.Error // +// // This function is auto-generated. +// func RecordErrStaleData(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1040,7 +1090,9 @@ func RecordErrStaleData(mm ...*recordActionProps) *errors.Error { // RecordErrNotAllowedToRead returns "compose:record.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func RecordErrNotAllowedToRead(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1074,7 +1126,9 @@ func RecordErrNotAllowedToRead(mm ...*recordActionProps) *errors.Error { // RecordErrNotAllowedToSearch returns "compose:record.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func RecordErrNotAllowedToSearch(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1108,7 +1162,9 @@ func RecordErrNotAllowedToSearch(mm ...*recordActionProps) *errors.Error { // RecordErrNotAllowedToSearchRevisions returns "compose:record.notAllowedToSearchRevisions" as *errors.Error // +// // This function is auto-generated. +// func RecordErrNotAllowedToSearchRevisions(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1142,7 +1198,9 @@ func RecordErrNotAllowedToSearchRevisions(mm ...*recordActionProps) *errors.Erro // RecordErrRevisionsDisabledOnModule returns "compose:record.revisionsDisabledOnModule" as *errors.Error // +// // This function is auto-generated. +// func RecordErrRevisionsDisabledOnModule(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1176,7 +1234,9 @@ func RecordErrRevisionsDisabledOnModule(mm ...*recordActionProps) *errors.Error // RecordErrNotAllowedToReadNamespace returns "compose:record.notAllowedToReadNamespace" as *errors.Error // +// // This function is auto-generated. +// func RecordErrNotAllowedToReadNamespace(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1210,7 +1270,9 @@ func RecordErrNotAllowedToReadNamespace(mm ...*recordActionProps) *errors.Error // RecordErrNotAllowedToReadModule returns "compose:record.notAllowedToReadModule" as *errors.Error // +// // This function is auto-generated. +// func RecordErrNotAllowedToReadModule(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1244,7 +1306,9 @@ func RecordErrNotAllowedToReadModule(mm ...*recordActionProps) *errors.Error { // RecordErrNotAllowedToListRecords returns "compose:record.notAllowedToListRecords" as *errors.Error // +// // This function is auto-generated. +// func RecordErrNotAllowedToListRecords(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1278,7 +1342,9 @@ func RecordErrNotAllowedToListRecords(mm ...*recordActionProps) *errors.Error { // RecordErrNotAllowedToCreate returns "compose:record.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func RecordErrNotAllowedToCreate(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1312,7 +1378,9 @@ func RecordErrNotAllowedToCreate(mm ...*recordActionProps) *errors.Error { // RecordErrNotAllowedToUpdate returns "compose:record.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func RecordErrNotAllowedToUpdate(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1346,7 +1414,9 @@ func RecordErrNotAllowedToUpdate(mm ...*recordActionProps) *errors.Error { // RecordErrNotAllowedToDelete returns "compose:record.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func RecordErrNotAllowedToDelete(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1380,7 +1450,9 @@ func RecordErrNotAllowedToDelete(mm ...*recordActionProps) *errors.Error { // RecordErrNotAllowedToUndelete returns "compose:record.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func RecordErrNotAllowedToUndelete(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1414,7 +1486,9 @@ func RecordErrNotAllowedToUndelete(mm ...*recordActionProps) *errors.Error { // RecordErrNotAllowedToChangeFieldValue returns "compose:record.notAllowedToChangeFieldValue" as *errors.Error // +// // This function is auto-generated. +// func RecordErrNotAllowedToChangeFieldValue(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1448,7 +1522,9 @@ func RecordErrNotAllowedToChangeFieldValue(mm ...*recordActionProps) *errors.Err // RecordErrMissingPositionField returns "compose:record.missingPositionField" as *errors.Error // +// // This function is auto-generated. +// func RecordErrMissingPositionField(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1482,7 +1558,9 @@ func RecordErrMissingPositionField(mm ...*recordActionProps) *errors.Error { // RecordErrInvalidPositionFieldKind returns "compose:record.invalidPositionFieldKind" as *errors.Error // +// // This function is auto-generated. +// func RecordErrInvalidPositionFieldKind(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1516,7 +1594,9 @@ func RecordErrInvalidPositionFieldKind(mm ...*recordActionProps) *errors.Error { // RecordErrInvalidPositionFieldConfigMultiValue returns "compose:record.invalidPositionFieldConfigMultiValue" as *errors.Error // +// // This function is auto-generated. +// func RecordErrInvalidPositionFieldConfigMultiValue(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1550,7 +1630,9 @@ func RecordErrInvalidPositionFieldConfigMultiValue(mm ...*recordActionProps) *er // RecordErrInvalidPositionValueType returns "compose:record.invalidPositionValueType" as *errors.Error // +// // This function is auto-generated. +// func RecordErrInvalidPositionValueType(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1584,7 +1666,9 @@ func RecordErrInvalidPositionValueType(mm ...*recordActionProps) *errors.Error { // RecordErrMissingGroupField returns "compose:record.missingGroupField" as *errors.Error // +// // This function is auto-generated. +// func RecordErrMissingGroupField(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1618,7 +1702,9 @@ func RecordErrMissingGroupField(mm ...*recordActionProps) *errors.Error { // RecordErrInvalidGroupFieldConfigMultiValue returns "compose:record.invalidGroupFieldConfigMultiValue" as *errors.Error // +// // This function is auto-generated. +// func RecordErrInvalidGroupFieldConfigMultiValue(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1652,7 +1738,9 @@ func RecordErrInvalidGroupFieldConfigMultiValue(mm ...*recordActionProps) *error // RecordErrImportSessionAlreadActive returns "compose:record.importSessionAlreadActive" as *errors.Error // +// // This function is auto-generated. +// func RecordErrImportSessionAlreadActive(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1686,7 +1774,9 @@ func RecordErrImportSessionAlreadActive(mm ...*recordActionProps) *errors.Error // RecordErrFieldNotFound returns "compose:record.fieldNotFound" as *errors.Error // +// // This function is auto-generated. +// func RecordErrFieldNotFound(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1718,7 +1808,9 @@ func RecordErrFieldNotFound(mm ...*recordActionProps) *errors.Error { // RecordErrInvalidValueStructure returns "compose:record.invalidValueStructure" as *errors.Error // +// // This function is auto-generated. +// func RecordErrInvalidValueStructure(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1750,7 +1842,9 @@ func RecordErrInvalidValueStructure(mm ...*recordActionProps) *errors.Error { // RecordErrUnknownBulkOperation returns "compose:record.unknownBulkOperation" as *errors.Error // +// // This function is auto-generated. +// func RecordErrUnknownBulkOperation(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1782,7 +1876,9 @@ func RecordErrUnknownBulkOperation(mm ...*recordActionProps) *errors.Error { // RecordErrInvalidReferenceFormat returns "compose:record.invalidReferenceFormat" as *errors.Error // +// // This function is auto-generated. +// func RecordErrInvalidReferenceFormat(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1814,7 +1910,9 @@ func RecordErrInvalidReferenceFormat(mm ...*recordActionProps) *errors.Error { // RecordErrValueInput returns "compose:record.valueInput" as *errors.Error // +// // This function is auto-generated. +// func RecordErrValueInput(mm ...*recordActionProps) *errors.Error { var p = &recordActionProps{} if len(mm) > 0 { @@ -1852,6 +1950,7 @@ func RecordErrValueInput(mm ...*recordActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc record) recordAction(ctx context.Context, props *recordActionProps, actionFn func(...*recordActionProps) *recordAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/compose/types/page_layout.go b/server/compose/types/page_layout.go index 4f8b2bcc3..5be49988a 100644 --- a/server/compose/types/page_layout.go +++ b/server/compose/types/page_layout.go @@ -12,14 +12,14 @@ import ( type ( PageLayout struct { - ID uint64 `json:"pageLayoutID,string"` - PageID uint64 `json:"pageID,string"` - ParentID uint64 `json:"parentID,string"` - Handle string `json:"handle"` - Primary bool `json:"primary"` - + ID uint64 `json:"pageLayoutID,string"` NamespaceID uint64 `json:"namespaceID,string"` - ModuleID uint64 `json:"moduleID,string"` + PageID uint64 `json:"pageID,string"` + ParentID uint64 `json:"parentID,string"` + Handle string `json:"handle"` + Primary bool `json:"primary"` + + Weight int `json:"weight"` Meta *PageLayoutMeta `json:"meta"` @@ -52,24 +52,14 @@ type ( Enabled bool `json:"enabled"` } - // @todo this will probably expand with a more modular action-like system - PageLayoutButtonConfig struct { - New PageLayoutButton `json:"new"` - Edit PageLayoutButton `json:"edit"` - Submit PageLayoutButton `json:"submit"` - Delete PageLayoutButton `json:"delete"` - Clone PageLayoutButton `json:"clone"` - Back PageLayoutButton `json:"back"` - } - PageLayoutConfig struct { Visibility PageLayoutVisibility `json:"visibility"` Actions []PageLayoutAction `json:"actions"` } PageLayoutVisibility struct { - Expression string - Roles []string + Expression string `json:"expression"` + Roles []string `json:"roles"` } PageLayoutAction struct { @@ -86,7 +76,6 @@ type ( PageLayoutFilter struct { NamespaceID uint64 `json:"namespaceID,string"` PageID uint64 `json:"pageID,string,omitempty"` - ModuleID uint64 `json:"moduleID,string,omitempty"` Primary bool `json:"primary,omitempty"` Handle string `json:"handle"` Name string `json:"name"` diff --git a/server/federation/service/access_control_actions.gen.go b/server/federation/service/access_control_actions.gen.go index a7207314e..b4ac04ac7 100644 --- a/server/federation/service/access_control_actions.gen.go +++ b/server/federation/service/access_control_actions.gen.go @@ -52,6 +52,7 @@ var ( // setRule updates accessControlActionProps's rule // // This function is auto-generated. +// func (p *accessControlActionProps) setRule(rule *rbac.Rule) *accessControlActionProps { p.rule = rule return p @@ -60,6 +61,7 @@ func (p *accessControlActionProps) setRule(rule *rbac.Rule) *accessControlAction // Serialize converts accessControlActionProps to actionlog.Meta // // This function is auto-generated. +// func (p accessControlActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -78,6 +80,7 @@ func (p accessControlActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p accessControlActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -126,6 +129,7 @@ func (p accessControlActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *accessControlAction) String() string { var props = &accessControlActionProps{} @@ -153,6 +157,7 @@ func (e *accessControlAction) ToAction() *actionlog.Action { // AccessControlActionGrant returns "federation:access_control.grant" action // // This function is auto-generated. +// func AccessControlActionGrant(props ...*accessControlActionProps) *accessControlAction { a := &accessControlAction{ timestamp: time.Now(), @@ -175,7 +180,9 @@ func AccessControlActionGrant(props ...*accessControlActionProps) *accessControl // AccessControlErrGeneric returns "federation:access_control.generic" as *errors.Error // +// // This function is auto-generated. +// func AccessControlErrGeneric(mm ...*accessControlActionProps) *errors.Error { var p = &accessControlActionProps{} if len(mm) > 0 { @@ -209,7 +216,9 @@ func AccessControlErrGeneric(mm ...*accessControlActionProps) *errors.Error { // AccessControlErrNotAllowedToSetPermissions returns "federation:access_control.notAllowedToSetPermissions" as *errors.Error // +// // This function is auto-generated. +// func AccessControlErrNotAllowedToSetPermissions(mm ...*accessControlActionProps) *errors.Error { var p = &accessControlActionProps{} if len(mm) > 0 { @@ -247,6 +256,7 @@ func AccessControlErrNotAllowedToSetPermissions(mm ...*accessControlActionProps) // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc accessControl) recordAction(ctx context.Context, props *accessControlActionProps, actionFn func(...*accessControlActionProps) *accessControlAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/federation/service/exposed_module_actions.gen.go b/server/federation/service/exposed_module_actions.gen.go index b9e076bb2..db10a2c22 100644 --- a/server/federation/service/exposed_module_actions.gen.go +++ b/server/federation/service/exposed_module_actions.gen.go @@ -57,6 +57,7 @@ var ( // setModule updates exposedModuleActionProps's module // // This function is auto-generated. +// func (p *exposedModuleActionProps) setModule(module *types.ExposedModule) *exposedModuleActionProps { p.module = module return p @@ -65,6 +66,7 @@ func (p *exposedModuleActionProps) setModule(module *types.ExposedModule) *expos // setUpdate updates exposedModuleActionProps's update // // This function is auto-generated. +// func (p *exposedModuleActionProps) setUpdate(update *types.ExposedModule) *exposedModuleActionProps { p.update = update return p @@ -73,6 +75,7 @@ func (p *exposedModuleActionProps) setUpdate(update *types.ExposedModule) *expos // setCreate updates exposedModuleActionProps's create // // This function is auto-generated. +// func (p *exposedModuleActionProps) setCreate(create *types.ExposedModule) *exposedModuleActionProps { p.create = create return p @@ -81,6 +84,7 @@ func (p *exposedModuleActionProps) setCreate(create *types.ExposedModule) *expos // setDelete updates exposedModuleActionProps's delete // // This function is auto-generated. +// func (p *exposedModuleActionProps) setDelete(delete *types.ExposedModule) *exposedModuleActionProps { p.delete = delete return p @@ -89,6 +93,7 @@ func (p *exposedModuleActionProps) setDelete(delete *types.ExposedModule) *expos // setFilter updates exposedModuleActionProps's filter // // This function is auto-generated. +// func (p *exposedModuleActionProps) setFilter(filter *types.ExposedModuleFilter) *exposedModuleActionProps { p.filter = filter return p @@ -97,6 +102,7 @@ func (p *exposedModuleActionProps) setFilter(filter *types.ExposedModuleFilter) // setNode updates exposedModuleActionProps's node // // This function is auto-generated. +// func (p *exposedModuleActionProps) setNode(node *types.Node) *exposedModuleActionProps { p.node = node return p @@ -105,6 +111,7 @@ func (p *exposedModuleActionProps) setNode(node *types.Node) *exposedModuleActio // Serialize converts exposedModuleActionProps to actionlog.Meta // // This function is auto-generated. +// func (p exposedModuleActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -150,6 +157,7 @@ func (p exposedModuleActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p exposedModuleActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -282,6 +290,7 @@ func (p exposedModuleActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *exposedModuleAction) String() string { var props = &exposedModuleActionProps{} @@ -309,6 +318,7 @@ func (e *exposedModuleAction) ToAction() *actionlog.Action { // ExposedModuleActionSearch returns "federation:exposed_module.search" action // // This function is auto-generated. +// func ExposedModuleActionSearch(props ...*exposedModuleActionProps) *exposedModuleAction { a := &exposedModuleAction{ timestamp: time.Now(), @@ -328,6 +338,7 @@ func ExposedModuleActionSearch(props ...*exposedModuleActionProps) *exposedModul // ExposedModuleActionLookup returns "federation:exposed_module.lookup" action // // This function is auto-generated. +// func ExposedModuleActionLookup(props ...*exposedModuleActionProps) *exposedModuleAction { a := &exposedModuleAction{ timestamp: time.Now(), @@ -347,6 +358,7 @@ func ExposedModuleActionLookup(props ...*exposedModuleActionProps) *exposedModul // ExposedModuleActionCreate returns "federation:exposed_module.create" action // // This function is auto-generated. +// func ExposedModuleActionCreate(props ...*exposedModuleActionProps) *exposedModuleAction { a := &exposedModuleAction{ timestamp: time.Now(), @@ -366,6 +378,7 @@ func ExposedModuleActionCreate(props ...*exposedModuleActionProps) *exposedModul // ExposedModuleActionUpdate returns "federation:exposed_module.update" action // // This function is auto-generated. +// func ExposedModuleActionUpdate(props ...*exposedModuleActionProps) *exposedModuleAction { a := &exposedModuleAction{ timestamp: time.Now(), @@ -385,6 +398,7 @@ func ExposedModuleActionUpdate(props ...*exposedModuleActionProps) *exposedModul // ExposedModuleActionDelete returns "federation:exposed_module.delete" action // // This function is auto-generated. +// func ExposedModuleActionDelete(props ...*exposedModuleActionProps) *exposedModuleAction { a := &exposedModuleAction{ timestamp: time.Now(), @@ -404,6 +418,7 @@ func ExposedModuleActionDelete(props ...*exposedModuleActionProps) *exposedModul // ExposedModuleActionUndelete returns "federation:exposed_module.undelete" action // // This function is auto-generated. +// func ExposedModuleActionUndelete(props ...*exposedModuleActionProps) *exposedModuleAction { a := &exposedModuleAction{ timestamp: time.Now(), @@ -426,7 +441,9 @@ func ExposedModuleActionUndelete(props ...*exposedModuleActionProps) *exposedMod // ExposedModuleErrGeneric returns "federation:exposed_module.generic" as *errors.Error // +// // This function is auto-generated. +// func ExposedModuleErrGeneric(mm ...*exposedModuleActionProps) *errors.Error { var p = &exposedModuleActionProps{} if len(mm) > 0 { @@ -460,7 +477,9 @@ func ExposedModuleErrGeneric(mm ...*exposedModuleActionProps) *errors.Error { // ExposedModuleErrNotFound returns "federation:exposed_module.notFound" as *errors.Error // +// // This function is auto-generated. +// func ExposedModuleErrNotFound(mm ...*exposedModuleActionProps) *errors.Error { var p = &exposedModuleActionProps{} if len(mm) > 0 { @@ -492,7 +511,9 @@ func ExposedModuleErrNotFound(mm ...*exposedModuleActionProps) *errors.Error { // ExposedModuleErrInvalidID returns "federation:exposed_module.invalidID" as *errors.Error // +// // This function is auto-generated. +// func ExposedModuleErrInvalidID(mm ...*exposedModuleActionProps) *errors.Error { var p = &exposedModuleActionProps{} if len(mm) > 0 { @@ -524,7 +545,9 @@ func ExposedModuleErrInvalidID(mm ...*exposedModuleActionProps) *errors.Error { // ExposedModuleErrStaleData returns "federation:exposed_module.staleData" as *errors.Error // +// // This function is auto-generated. +// func ExposedModuleErrStaleData(mm ...*exposedModuleActionProps) *errors.Error { var p = &exposedModuleActionProps{} if len(mm) > 0 { @@ -556,7 +579,9 @@ func ExposedModuleErrStaleData(mm ...*exposedModuleActionProps) *errors.Error { // ExposedModuleErrNotUnique returns "federation:exposed_module.notUnique" as *errors.Error // +// // This function is auto-generated. +// func ExposedModuleErrNotUnique(mm ...*exposedModuleActionProps) *errors.Error { var p = &exposedModuleActionProps{} if len(mm) > 0 { @@ -590,7 +615,9 @@ func ExposedModuleErrNotUnique(mm ...*exposedModuleActionProps) *errors.Error { // ExposedModuleErrNodeNotFound returns "federation:exposed_module.nodeNotFound" as *errors.Error // +// // This function is auto-generated. +// func ExposedModuleErrNodeNotFound(mm ...*exposedModuleActionProps) *errors.Error { var p = &exposedModuleActionProps{} if len(mm) > 0 { @@ -622,7 +649,9 @@ func ExposedModuleErrNodeNotFound(mm ...*exposedModuleActionProps) *errors.Error // ExposedModuleErrComposeModuleNotFound returns "federation:exposed_module.composeModuleNotFound" as *errors.Error // +// // This function is auto-generated. +// func ExposedModuleErrComposeModuleNotFound(mm ...*exposedModuleActionProps) *errors.Error { var p = &exposedModuleActionProps{} if len(mm) > 0 { @@ -654,7 +683,9 @@ func ExposedModuleErrComposeModuleNotFound(mm ...*exposedModuleActionProps) *err // ExposedModuleErrComposeNamespaceNotFound returns "federation:exposed_module.composeNamespaceNotFound" as *errors.Error // +// // This function is auto-generated. +// func ExposedModuleErrComposeNamespaceNotFound(mm ...*exposedModuleActionProps) *errors.Error { var p = &exposedModuleActionProps{} if len(mm) > 0 { @@ -686,7 +717,9 @@ func ExposedModuleErrComposeNamespaceNotFound(mm ...*exposedModuleActionProps) * // ExposedModuleErrRequestParametersInvalid returns "federation:exposed_module.requestParametersInvalid" as *errors.Error // +// // This function is auto-generated. +// func ExposedModuleErrRequestParametersInvalid(mm ...*exposedModuleActionProps) *errors.Error { var p = &exposedModuleActionProps{} if len(mm) > 0 { @@ -718,7 +751,9 @@ func ExposedModuleErrRequestParametersInvalid(mm ...*exposedModuleActionProps) * // ExposedModuleErrNotAllowedToCreate returns "federation:exposed_module.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func ExposedModuleErrNotAllowedToCreate(mm ...*exposedModuleActionProps) *errors.Error { var p = &exposedModuleActionProps{} if len(mm) > 0 { @@ -752,7 +787,9 @@ func ExposedModuleErrNotAllowedToCreate(mm ...*exposedModuleActionProps) *errors // ExposedModuleErrNotAllowedToManage returns "federation:exposed_module.notAllowedToManage" as *errors.Error // +// // This function is auto-generated. +// func ExposedModuleErrNotAllowedToManage(mm ...*exposedModuleActionProps) *errors.Error { var p = &exposedModuleActionProps{} if len(mm) > 0 { @@ -792,6 +829,7 @@ func ExposedModuleErrNotAllowedToManage(mm ...*exposedModuleActionProps) *errors // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc exposedModule) recordAction(ctx context.Context, props *exposedModuleActionProps, actionFn func(...*exposedModuleActionProps) *exposedModuleAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/federation/service/module_mapping_actions.gen.go b/server/federation/service/module_mapping_actions.gen.go index adf1f3df8..2897dac05 100644 --- a/server/federation/service/module_mapping_actions.gen.go +++ b/server/federation/service/module_mapping_actions.gen.go @@ -55,6 +55,7 @@ var ( // setCreated updates moduleMappingActionProps's created // // This function is auto-generated. +// func (p *moduleMappingActionProps) setCreated(created *types.ModuleMapping) *moduleMappingActionProps { p.created = created return p @@ -63,6 +64,7 @@ func (p *moduleMappingActionProps) setCreated(created *types.ModuleMapping) *mod // setMapping updates moduleMappingActionProps's mapping // // This function is auto-generated. +// func (p *moduleMappingActionProps) setMapping(mapping *types.ModuleMapping) *moduleMappingActionProps { p.mapping = mapping return p @@ -71,6 +73,7 @@ func (p *moduleMappingActionProps) setMapping(mapping *types.ModuleMapping) *mod // setChanged updates moduleMappingActionProps's changed // // This function is auto-generated. +// func (p *moduleMappingActionProps) setChanged(changed *types.ModuleMapping) *moduleMappingActionProps { p.changed = changed return p @@ -79,6 +82,7 @@ func (p *moduleMappingActionProps) setChanged(changed *types.ModuleMapping) *mod // setFilter updates moduleMappingActionProps's filter // // This function is auto-generated. +// func (p *moduleMappingActionProps) setFilter(filter *types.ModuleMappingFilter) *moduleMappingActionProps { p.filter = filter return p @@ -87,6 +91,7 @@ func (p *moduleMappingActionProps) setFilter(filter *types.ModuleMappingFilter) // Serialize converts moduleMappingActionProps to actionlog.Meta // // This function is auto-generated. +// func (p moduleMappingActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -116,6 +121,7 @@ func (p moduleMappingActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p moduleMappingActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -204,6 +210,7 @@ func (p moduleMappingActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *moduleMappingAction) String() string { var props = &moduleMappingActionProps{} @@ -231,6 +238,7 @@ func (e *moduleMappingAction) ToAction() *actionlog.Action { // ModuleMappingActionSearch returns "federation:module_mapping.search" action // // This function is auto-generated. +// func ModuleMappingActionSearch(props ...*moduleMappingActionProps) *moduleMappingAction { a := &moduleMappingAction{ timestamp: time.Now(), @@ -250,6 +258,7 @@ func ModuleMappingActionSearch(props ...*moduleMappingActionProps) *moduleMappin // ModuleMappingActionLookup returns "federation:module_mapping.lookup" action // // This function is auto-generated. +// func ModuleMappingActionLookup(props ...*moduleMappingActionProps) *moduleMappingAction { a := &moduleMappingAction{ timestamp: time.Now(), @@ -269,6 +278,7 @@ func ModuleMappingActionLookup(props ...*moduleMappingActionProps) *moduleMappin // ModuleMappingActionCreate returns "federation:module_mapping.create" action // // This function is auto-generated. +// func ModuleMappingActionCreate(props ...*moduleMappingActionProps) *moduleMappingAction { a := &moduleMappingAction{ timestamp: time.Now(), @@ -288,6 +298,7 @@ func ModuleMappingActionCreate(props ...*moduleMappingActionProps) *moduleMappin // ModuleMappingActionUpdate returns "federation:module_mapping.update" action // // This function is auto-generated. +// func ModuleMappingActionUpdate(props ...*moduleMappingActionProps) *moduleMappingAction { a := &moduleMappingAction{ timestamp: time.Now(), @@ -307,6 +318,7 @@ func ModuleMappingActionUpdate(props ...*moduleMappingActionProps) *moduleMappin // ModuleMappingActionDelete returns "federation:module_mapping.delete" action // // This function is auto-generated. +// func ModuleMappingActionDelete(props ...*moduleMappingActionProps) *moduleMappingAction { a := &moduleMappingAction{ timestamp: time.Now(), @@ -329,7 +341,9 @@ func ModuleMappingActionDelete(props ...*moduleMappingActionProps) *moduleMappin // ModuleMappingErrGeneric returns "federation:module_mapping.generic" as *errors.Error // +// // This function is auto-generated. +// func ModuleMappingErrGeneric(mm ...*moduleMappingActionProps) *errors.Error { var p = &moduleMappingActionProps{} if len(mm) > 0 { @@ -363,7 +377,9 @@ func ModuleMappingErrGeneric(mm ...*moduleMappingActionProps) *errors.Error { // ModuleMappingErrNotFound returns "federation:module_mapping.notFound" as *errors.Error // +// // This function is auto-generated. +// func ModuleMappingErrNotFound(mm ...*moduleMappingActionProps) *errors.Error { var p = &moduleMappingActionProps{} if len(mm) > 0 { @@ -395,7 +411,9 @@ func ModuleMappingErrNotFound(mm ...*moduleMappingActionProps) *errors.Error { // ModuleMappingErrComposeModuleNotFound returns "federation:module_mapping.composeModuleNotFound" as *errors.Error // +// // This function is auto-generated. +// func ModuleMappingErrComposeModuleNotFound(mm ...*moduleMappingActionProps) *errors.Error { var p = &moduleMappingActionProps{} if len(mm) > 0 { @@ -427,7 +445,9 @@ func ModuleMappingErrComposeModuleNotFound(mm ...*moduleMappingActionProps) *err // ModuleMappingErrComposeNamespaceNotFound returns "federation:module_mapping.composeNamespaceNotFound" as *errors.Error // +// // This function is auto-generated. +// func ModuleMappingErrComposeNamespaceNotFound(mm ...*moduleMappingActionProps) *errors.Error { var p = &moduleMappingActionProps{} if len(mm) > 0 { @@ -459,7 +479,9 @@ func ModuleMappingErrComposeNamespaceNotFound(mm ...*moduleMappingActionProps) * // ModuleMappingErrFederationModuleNotFound returns "federation:module_mapping.federationModuleNotFound" as *errors.Error // +// // This function is auto-generated. +// func ModuleMappingErrFederationModuleNotFound(mm ...*moduleMappingActionProps) *errors.Error { var p = &moduleMappingActionProps{} if len(mm) > 0 { @@ -491,7 +513,9 @@ func ModuleMappingErrFederationModuleNotFound(mm ...*moduleMappingActionProps) * // ModuleMappingErrNodeNotFound returns "federation:module_mapping.nodeNotFound" as *errors.Error // +// // This function is auto-generated. +// func ModuleMappingErrNodeNotFound(mm ...*moduleMappingActionProps) *errors.Error { var p = &moduleMappingActionProps{} if len(mm) > 0 { @@ -523,7 +547,9 @@ func ModuleMappingErrNodeNotFound(mm ...*moduleMappingActionProps) *errors.Error // ModuleMappingErrModuleMappingExists returns "federation:module_mapping.moduleMappingExists" as *errors.Error // +// // This function is auto-generated. +// func ModuleMappingErrModuleMappingExists(mm ...*moduleMappingActionProps) *errors.Error { var p = &moduleMappingActionProps{} if len(mm) > 0 { @@ -555,7 +581,9 @@ func ModuleMappingErrModuleMappingExists(mm ...*moduleMappingActionProps) *error // ModuleMappingErrNotAllowedToMap returns "federation:module_mapping.notAllowedToMap" as *errors.Error // +// // This function is auto-generated. +// func ModuleMappingErrNotAllowedToMap(mm ...*moduleMappingActionProps) *errors.Error { var p = &moduleMappingActionProps{} if len(mm) > 0 { @@ -595,6 +623,7 @@ func ModuleMappingErrNotAllowedToMap(mm ...*moduleMappingActionProps) *errors.Er // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc moduleMapping) recordAction(ctx context.Context, props *moduleMappingActionProps, actionFn func(...*moduleMappingActionProps) *moduleMappingAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/federation/service/node_actions.gen.go b/server/federation/service/node_actions.gen.go index 7327e23cb..bf8d059c9 100644 --- a/server/federation/service/node_actions.gen.go +++ b/server/federation/service/node_actions.gen.go @@ -54,6 +54,7 @@ var ( // setNode updates nodeActionProps's node // // This function is auto-generated. +// func (p *nodeActionProps) setNode(node *types.Node) *nodeActionProps { p.node = node return p @@ -62,6 +63,7 @@ func (p *nodeActionProps) setNode(node *types.Node) *nodeActionProps { // setPairingURI updates nodeActionProps's pairingURI // // This function is auto-generated. +// func (p *nodeActionProps) setPairingURI(pairingURI string) *nodeActionProps { p.pairingURI = pairingURI return p @@ -70,6 +72,7 @@ func (p *nodeActionProps) setPairingURI(pairingURI string) *nodeActionProps { // setFilter updates nodeActionProps's filter // // This function is auto-generated. +// func (p *nodeActionProps) setFilter(filter *types.NodeFilter) *nodeActionProps { p.filter = filter return p @@ -78,6 +81,7 @@ func (p *nodeActionProps) setFilter(filter *types.NodeFilter) *nodeActionProps { // Serialize converts nodeActionProps to actionlog.Meta // // This function is auto-generated. +// func (p nodeActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -101,6 +105,7 @@ func (p nodeActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p nodeActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -164,6 +169,7 @@ func (p nodeActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *nodeAction) String() string { var props = &nodeActionProps{} @@ -191,6 +197,7 @@ func (e *nodeAction) ToAction() *actionlog.Action { // NodeActionSearch returns "federation:node.search" action // // This function is auto-generated. +// func NodeActionSearch(props ...*nodeActionProps) *nodeAction { a := &nodeAction{ timestamp: time.Now(), @@ -210,6 +217,7 @@ func NodeActionSearch(props ...*nodeActionProps) *nodeAction { // NodeActionLookup returns "federation:node.lookup" action // // This function is auto-generated. +// func NodeActionLookup(props ...*nodeActionProps) *nodeAction { a := &nodeAction{ timestamp: time.Now(), @@ -229,6 +237,7 @@ func NodeActionLookup(props ...*nodeActionProps) *nodeAction { // NodeActionCreate returns "federation:node.create" action // // This function is auto-generated. +// func NodeActionCreate(props ...*nodeActionProps) *nodeAction { a := &nodeAction{ timestamp: time.Now(), @@ -248,6 +257,7 @@ func NodeActionCreate(props ...*nodeActionProps) *nodeAction { // NodeActionCreateFromPairingURI returns "federation:node.createFromPairingURI" action // // This function is auto-generated. +// func NodeActionCreateFromPairingURI(props ...*nodeActionProps) *nodeAction { a := &nodeAction{ timestamp: time.Now(), @@ -267,6 +277,7 @@ func NodeActionCreateFromPairingURI(props ...*nodeActionProps) *nodeAction { // NodeActionRecreateFromPairingURI returns "federation:node.recreateFromPairingURI" action // // This function is auto-generated. +// func NodeActionRecreateFromPairingURI(props ...*nodeActionProps) *nodeAction { a := &nodeAction{ timestamp: time.Now(), @@ -286,6 +297,7 @@ func NodeActionRecreateFromPairingURI(props ...*nodeActionProps) *nodeAction { // NodeActionUpdate returns "federation:node.update" action // // This function is auto-generated. +// func NodeActionUpdate(props ...*nodeActionProps) *nodeAction { a := &nodeAction{ timestamp: time.Now(), @@ -305,6 +317,7 @@ func NodeActionUpdate(props ...*nodeActionProps) *nodeAction { // NodeActionDelete returns "federation:node.delete" action // // This function is auto-generated. +// func NodeActionDelete(props ...*nodeActionProps) *nodeAction { a := &nodeAction{ timestamp: time.Now(), @@ -324,6 +337,7 @@ func NodeActionDelete(props ...*nodeActionProps) *nodeAction { // NodeActionUndelete returns "federation:node.undelete" action // // This function is auto-generated. +// func NodeActionUndelete(props ...*nodeActionProps) *nodeAction { a := &nodeAction{ timestamp: time.Now(), @@ -343,6 +357,7 @@ func NodeActionUndelete(props ...*nodeActionProps) *nodeAction { // NodeActionOttRegenerated returns "federation:node.ottRegenerated" action // // This function is auto-generated. +// func NodeActionOttRegenerated(props ...*nodeActionProps) *nodeAction { a := &nodeAction{ timestamp: time.Now(), @@ -362,6 +377,7 @@ func NodeActionOttRegenerated(props ...*nodeActionProps) *nodeAction { // NodeActionPair returns "federation:node.pair" action // // This function is auto-generated. +// func NodeActionPair(props ...*nodeActionProps) *nodeAction { a := &nodeAction{ timestamp: time.Now(), @@ -381,6 +397,7 @@ func NodeActionPair(props ...*nodeActionProps) *nodeAction { // NodeActionHandshakeInit returns "federation:node.handshakeInit" action // // This function is auto-generated. +// func NodeActionHandshakeInit(props ...*nodeActionProps) *nodeAction { a := &nodeAction{ timestamp: time.Now(), @@ -400,6 +417,7 @@ func NodeActionHandshakeInit(props ...*nodeActionProps) *nodeAction { // NodeActionHandshakeConfirm returns "federation:node.handshakeConfirm" action // // This function is auto-generated. +// func NodeActionHandshakeConfirm(props ...*nodeActionProps) *nodeAction { a := &nodeAction{ timestamp: time.Now(), @@ -419,6 +437,7 @@ func NodeActionHandshakeConfirm(props ...*nodeActionProps) *nodeAction { // NodeActionHandshakeComplete returns "federation:node.handshakeComplete" action // // This function is auto-generated. +// func NodeActionHandshakeComplete(props ...*nodeActionProps) *nodeAction { a := &nodeAction{ timestamp: time.Now(), @@ -441,7 +460,9 @@ func NodeActionHandshakeComplete(props ...*nodeActionProps) *nodeAction { // NodeErrGeneric returns "federation:node.generic" as *errors.Error // +// // This function is auto-generated. +// func NodeErrGeneric(mm ...*nodeActionProps) *errors.Error { var p = &nodeActionProps{} if len(mm) > 0 { @@ -475,7 +496,9 @@ func NodeErrGeneric(mm ...*nodeActionProps) *errors.Error { // NodeErrNotFound returns "federation:node.notFound" as *errors.Error // +// // This function is auto-generated. +// func NodeErrNotFound(mm ...*nodeActionProps) *errors.Error { var p = &nodeActionProps{} if len(mm) > 0 { @@ -507,7 +530,9 @@ func NodeErrNotFound(mm ...*nodeActionProps) *errors.Error { // NodeErrInvalidID returns "federation:node.invalidID" as *errors.Error // +// // This function is auto-generated. +// func NodeErrInvalidID(mm ...*nodeActionProps) *errors.Error { var p = &nodeActionProps{} if len(mm) > 0 { @@ -539,7 +564,9 @@ func NodeErrInvalidID(mm ...*nodeActionProps) *errors.Error { // NodeErrPairingURIInvalid returns "federation:node.pairingURIInvalid" as *errors.Error // +// // This function is auto-generated. +// func NodeErrPairingURIInvalid(mm ...*nodeActionProps) *errors.Error { var p = &nodeActionProps{} if len(mm) > 0 { @@ -571,7 +598,9 @@ func NodeErrPairingURIInvalid(mm ...*nodeActionProps) *errors.Error { // NodeErrPairingURITokenInvalid returns "federation:node.pairingURITokenInvalid" as *errors.Error // +// // This function is auto-generated. +// func NodeErrPairingURITokenInvalid(mm ...*nodeActionProps) *errors.Error { var p = &nodeActionProps{} if len(mm) > 0 { @@ -603,7 +632,9 @@ func NodeErrPairingURITokenInvalid(mm ...*nodeActionProps) *errors.Error { // NodeErrPairingURISourceIDInvalid returns "federation:node.pairingURISourceIDInvalid" as *errors.Error // +// // This function is auto-generated. +// func NodeErrPairingURISourceIDInvalid(mm ...*nodeActionProps) *errors.Error { var p = &nodeActionProps{} if len(mm) > 0 { @@ -635,7 +666,9 @@ func NodeErrPairingURISourceIDInvalid(mm ...*nodeActionProps) *errors.Error { // NodeErrPairingTokenInvalid returns "federation:node.pairingTokenInvalid" as *errors.Error // +// // This function is auto-generated. +// func NodeErrPairingTokenInvalid(mm ...*nodeActionProps) *errors.Error { var p = &nodeActionProps{} if len(mm) > 0 { @@ -667,7 +700,9 @@ func NodeErrPairingTokenInvalid(mm ...*nodeActionProps) *errors.Error { // NodeErrNotAllowedToCreate returns "federation:node.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func NodeErrNotAllowedToCreate(mm ...*nodeActionProps) *errors.Error { var p = &nodeActionProps{} if len(mm) > 0 { @@ -701,7 +736,9 @@ func NodeErrNotAllowedToCreate(mm ...*nodeActionProps) *errors.Error { // NodeErrNotAllowedToSearch returns "federation:node.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func NodeErrNotAllowedToSearch(mm ...*nodeActionProps) *errors.Error { var p = &nodeActionProps{} if len(mm) > 0 { @@ -735,7 +772,9 @@ func NodeErrNotAllowedToSearch(mm ...*nodeActionProps) *errors.Error { // NodeErrNotAllowedToManage returns "federation:node.notAllowedToManage" as *errors.Error // +// // This function is auto-generated. +// func NodeErrNotAllowedToManage(mm ...*nodeActionProps) *errors.Error { var p = &nodeActionProps{} if len(mm) > 0 { @@ -769,7 +808,9 @@ func NodeErrNotAllowedToManage(mm ...*nodeActionProps) *errors.Error { // NodeErrNotAllowedToPair returns "federation:node.notAllowedToPair" as *errors.Error // +// // This function is auto-generated. +// func NodeErrNotAllowedToPair(mm ...*nodeActionProps) *errors.Error { var p = &nodeActionProps{} if len(mm) > 0 { @@ -809,6 +850,7 @@ func NodeErrNotAllowedToPair(mm ...*nodeActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc node) recordAction(ctx context.Context, props *nodeActionProps, actionFn func(...*nodeActionProps) *nodeAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/federation/service/node_sync_actions.gen.go b/server/federation/service/node_sync_actions.gen.go index 170615628..7d41eb757 100644 --- a/server/federation/service/node_sync_actions.gen.go +++ b/server/federation/service/node_sync_actions.gen.go @@ -53,6 +53,7 @@ var ( // setNodeSync updates nodeSyncActionProps's nodeSync // // This function is auto-generated. +// func (p *nodeSyncActionProps) setNodeSync(nodeSync *types.NodeSync) *nodeSyncActionProps { p.nodeSync = nodeSync return p @@ -61,6 +62,7 @@ func (p *nodeSyncActionProps) setNodeSync(nodeSync *types.NodeSync) *nodeSyncAct // setNodeSyncFilter updates nodeSyncActionProps's nodeSyncFilter // // This function is auto-generated. +// func (p *nodeSyncActionProps) setNodeSyncFilter(nodeSyncFilter *types.NodeSyncFilter) *nodeSyncActionProps { p.nodeSyncFilter = nodeSyncFilter return p @@ -69,6 +71,7 @@ func (p *nodeSyncActionProps) setNodeSyncFilter(nodeSyncFilter *types.NodeSyncFi // Serialize converts nodeSyncActionProps to actionlog.Meta // // This function is auto-generated. +// func (p nodeSyncActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -90,6 +93,7 @@ func (p nodeSyncActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p nodeSyncActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -150,6 +154,7 @@ func (p nodeSyncActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *nodeSyncAction) String() string { var props = &nodeSyncActionProps{} @@ -177,6 +182,7 @@ func (e *nodeSyncAction) ToAction() *actionlog.Action { // NodeSyncActionLookup returns "federation:node_sync.lookup" action // // This function is auto-generated. +// func NodeSyncActionLookup(props ...*nodeSyncActionProps) *nodeSyncAction { a := &nodeSyncAction{ timestamp: time.Now(), @@ -196,6 +202,7 @@ func NodeSyncActionLookup(props ...*nodeSyncActionProps) *nodeSyncAction { // NodeSyncActionCreate returns "federation:node_sync.create" action // // This function is auto-generated. +// func NodeSyncActionCreate(props ...*nodeSyncActionProps) *nodeSyncAction { a := &nodeSyncAction{ timestamp: time.Now(), @@ -218,7 +225,9 @@ func NodeSyncActionCreate(props ...*nodeSyncActionProps) *nodeSyncAction { // NodeSyncErrGeneric returns "federation:node_sync.generic" as *errors.Error // +// // This function is auto-generated. +// func NodeSyncErrGeneric(mm ...*nodeSyncActionProps) *errors.Error { var p = &nodeSyncActionProps{} if len(mm) > 0 { @@ -252,7 +261,9 @@ func NodeSyncErrGeneric(mm ...*nodeSyncActionProps) *errors.Error { // NodeSyncErrNotFound returns "federation:node_sync.notFound" as *errors.Error // +// // This function is auto-generated. +// func NodeSyncErrNotFound(mm ...*nodeSyncActionProps) *errors.Error { var p = &nodeSyncActionProps{} if len(mm) > 0 { @@ -284,7 +295,9 @@ func NodeSyncErrNotFound(mm ...*nodeSyncActionProps) *errors.Error { // NodeSyncErrNodeNotFound returns "federation:node_sync.nodeNotFound" as *errors.Error // +// // This function is auto-generated. +// func NodeSyncErrNodeNotFound(mm ...*nodeSyncActionProps) *errors.Error { var p = &nodeSyncActionProps{} if len(mm) > 0 { @@ -322,6 +335,7 @@ func NodeSyncErrNodeNotFound(mm ...*nodeSyncActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc nodeSync) recordAction(ctx context.Context, props *nodeSyncActionProps, actionFn func(...*nodeSyncActionProps) *nodeSyncAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/federation/service/shared_module_actions.gen.go b/server/federation/service/shared_module_actions.gen.go index 40486384b..07ac4c83e 100644 --- a/server/federation/service/shared_module_actions.gen.go +++ b/server/federation/service/shared_module_actions.gen.go @@ -55,6 +55,7 @@ var ( // setModule updates sharedModuleActionProps's module // // This function is auto-generated. +// func (p *sharedModuleActionProps) setModule(module *types.SharedModule) *sharedModuleActionProps { p.module = module return p @@ -63,6 +64,7 @@ func (p *sharedModuleActionProps) setModule(module *types.SharedModule) *sharedM // setChanged updates sharedModuleActionProps's changed // // This function is auto-generated. +// func (p *sharedModuleActionProps) setChanged(changed *types.SharedModule) *sharedModuleActionProps { p.changed = changed return p @@ -71,6 +73,7 @@ func (p *sharedModuleActionProps) setChanged(changed *types.SharedModule) *share // setFilter updates sharedModuleActionProps's filter // // This function is auto-generated. +// func (p *sharedModuleActionProps) setFilter(filter *types.SharedModuleFilter) *sharedModuleActionProps { p.filter = filter return p @@ -79,6 +82,7 @@ func (p *sharedModuleActionProps) setFilter(filter *types.SharedModuleFilter) *s // setNode updates sharedModuleActionProps's node // // This function is auto-generated. +// func (p *sharedModuleActionProps) setNode(node *types.Node) *sharedModuleActionProps { p.node = node return p @@ -87,6 +91,7 @@ func (p *sharedModuleActionProps) setNode(node *types.Node) *sharedModuleActionP // Serialize converts sharedModuleActionProps to actionlog.Meta // // This function is auto-generated. +// func (p sharedModuleActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -114,6 +119,7 @@ func (p sharedModuleActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p sharedModuleActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -198,6 +204,7 @@ func (p sharedModuleActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *sharedModuleAction) String() string { var props = &sharedModuleActionProps{} @@ -225,6 +232,7 @@ func (e *sharedModuleAction) ToAction() *actionlog.Action { // SharedModuleActionSearch returns "federation:shared_module.search" action // // This function is auto-generated. +// func SharedModuleActionSearch(props ...*sharedModuleActionProps) *sharedModuleAction { a := &sharedModuleAction{ timestamp: time.Now(), @@ -244,6 +252,7 @@ func SharedModuleActionSearch(props ...*sharedModuleActionProps) *sharedModuleAc // SharedModuleActionLookup returns "federation:shared_module.lookup" action // // This function is auto-generated. +// func SharedModuleActionLookup(props ...*sharedModuleActionProps) *sharedModuleAction { a := &sharedModuleAction{ timestamp: time.Now(), @@ -263,6 +272,7 @@ func SharedModuleActionLookup(props ...*sharedModuleActionProps) *sharedModuleAc // SharedModuleActionCreate returns "federation:shared_module.create" action // // This function is auto-generated. +// func SharedModuleActionCreate(props ...*sharedModuleActionProps) *sharedModuleAction { a := &sharedModuleAction{ timestamp: time.Now(), @@ -282,6 +292,7 @@ func SharedModuleActionCreate(props ...*sharedModuleActionProps) *sharedModuleAc // SharedModuleActionUpdate returns "federation:shared_module.update" action // // This function is auto-generated. +// func SharedModuleActionUpdate(props ...*sharedModuleActionProps) *sharedModuleAction { a := &sharedModuleAction{ timestamp: time.Now(), @@ -301,6 +312,7 @@ func SharedModuleActionUpdate(props ...*sharedModuleActionProps) *sharedModuleAc // SharedModuleActionDelete returns "federation:shared_module.delete" action // // This function is auto-generated. +// func SharedModuleActionDelete(props ...*sharedModuleActionProps) *sharedModuleAction { a := &sharedModuleAction{ timestamp: time.Now(), @@ -320,6 +332,7 @@ func SharedModuleActionDelete(props ...*sharedModuleActionProps) *sharedModuleAc // SharedModuleActionUndelete returns "federation:shared_module.undelete" action // // This function is auto-generated. +// func SharedModuleActionUndelete(props ...*sharedModuleActionProps) *sharedModuleAction { a := &sharedModuleAction{ timestamp: time.Now(), @@ -342,7 +355,9 @@ func SharedModuleActionUndelete(props ...*sharedModuleActionProps) *sharedModule // SharedModuleErrGeneric returns "federation:shared_module.generic" as *errors.Error // +// // This function is auto-generated. +// func SharedModuleErrGeneric(mm ...*sharedModuleActionProps) *errors.Error { var p = &sharedModuleActionProps{} if len(mm) > 0 { @@ -376,7 +391,9 @@ func SharedModuleErrGeneric(mm ...*sharedModuleActionProps) *errors.Error { // SharedModuleErrNotFound returns "federation:shared_module.notFound" as *errors.Error // +// // This function is auto-generated. +// func SharedModuleErrNotFound(mm ...*sharedModuleActionProps) *errors.Error { var p = &sharedModuleActionProps{} if len(mm) > 0 { @@ -408,7 +425,9 @@ func SharedModuleErrNotFound(mm ...*sharedModuleActionProps) *errors.Error { // SharedModuleErrInvalidID returns "federation:shared_module.invalidID" as *errors.Error // +// // This function is auto-generated. +// func SharedModuleErrInvalidID(mm ...*sharedModuleActionProps) *errors.Error { var p = &sharedModuleActionProps{} if len(mm) > 0 { @@ -440,7 +459,9 @@ func SharedModuleErrInvalidID(mm ...*sharedModuleActionProps) *errors.Error { // SharedModuleErrStaleData returns "federation:shared_module.staleData" as *errors.Error // +// // This function is auto-generated. +// func SharedModuleErrStaleData(mm ...*sharedModuleActionProps) *errors.Error { var p = &sharedModuleActionProps{} if len(mm) > 0 { @@ -472,7 +493,9 @@ func SharedModuleErrStaleData(mm ...*sharedModuleActionProps) *errors.Error { // SharedModuleErrFederationSyncStructureChanged returns "federation:shared_module.federationSyncStructureChanged" as *errors.Error // +// // This function is auto-generated. +// func SharedModuleErrFederationSyncStructureChanged(mm ...*sharedModuleActionProps) *errors.Error { var p = &sharedModuleActionProps{} if len(mm) > 0 { @@ -506,7 +529,9 @@ func SharedModuleErrFederationSyncStructureChanged(mm ...*sharedModuleActionProp // SharedModuleErrNotUnique returns "federation:shared_module.notUnique" as *errors.Error // +// // This function is auto-generated. +// func SharedModuleErrNotUnique(mm ...*sharedModuleActionProps) *errors.Error { var p = &sharedModuleActionProps{} if len(mm) > 0 { @@ -540,7 +565,9 @@ func SharedModuleErrNotUnique(mm ...*sharedModuleActionProps) *errors.Error { // SharedModuleErrNodeNotFound returns "federation:shared_module.nodeNotFound" as *errors.Error // +// // This function is auto-generated. +// func SharedModuleErrNodeNotFound(mm ...*sharedModuleActionProps) *errors.Error { var p = &sharedModuleActionProps{} if len(mm) > 0 { @@ -572,7 +599,9 @@ func SharedModuleErrNodeNotFound(mm ...*sharedModuleActionProps) *errors.Error { // SharedModuleErrNotAllowedToCreate returns "federation:shared_module.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func SharedModuleErrNotAllowedToCreate(mm ...*sharedModuleActionProps) *errors.Error { var p = &sharedModuleActionProps{} if len(mm) > 0 { @@ -606,7 +635,9 @@ func SharedModuleErrNotAllowedToCreate(mm ...*sharedModuleActionProps) *errors.E // SharedModuleErrNotAllowedToManage returns "federation:shared_module.notAllowedToManage" as *errors.Error // +// // This function is auto-generated. +// func SharedModuleErrNotAllowedToManage(mm ...*sharedModuleActionProps) *errors.Error { var p = &sharedModuleActionProps{} if len(mm) > 0 { @@ -640,7 +671,9 @@ func SharedModuleErrNotAllowedToManage(mm ...*sharedModuleActionProps) *errors.E // SharedModuleErrNotAllowedToMap returns "federation:shared_module.notAllowedToMap" as *errors.Error // +// // This function is auto-generated. +// func SharedModuleErrNotAllowedToMap(mm ...*sharedModuleActionProps) *errors.Error { var p = &sharedModuleActionProps{} if len(mm) > 0 { @@ -680,6 +713,7 @@ func SharedModuleErrNotAllowedToMap(mm ...*sharedModuleActionProps) *errors.Erro // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc sharedModule) recordAction(ctx context.Context, props *sharedModuleActionProps, actionFn func(...*sharedModuleActionProps) *sharedModuleAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/pkg/envoy/resource/compose_layout.go b/server/pkg/envoy/resource/compose_layout.go index 91393fef5..4bc2f198a 100644 --- a/server/pkg/envoy/resource/compose_layout.go +++ b/server/pkg/envoy/resource/compose_layout.go @@ -133,10 +133,6 @@ func UnpackComposePageLayout(p *types.PageLayout) (*types.PageLayout, *Ref, *Ref var modRef *Ref var parentRef *Ref - if p.ModuleID != 0 { - modRef = MakeModuleRef(p.ModuleID, "", "") - } - return p, modRef, parentRef } diff --git a/server/pkg/expr/expr_types.gen.go b/server/pkg/expr/expr_types.gen.go index ec71bae08..bc2dc0f11 100644 --- a/server/pkg/expr/expr_types.gen.go +++ b/server/pkg/expr/expr_types.gen.go @@ -525,6 +525,7 @@ func (t *HttpRequest) AssignFieldValue(key string, val TypedValue) error { // // It allows gval lib to access HttpRequest's underlying value (*http.Request) // and it's fields +// func (t *HttpRequest) SelectGVal(ctx context.Context, k string) (interface{}, error) { t.mux.RLock() defer t.mux.RUnlock() diff --git a/server/store/adapters/rdbms/aux_types.gen.go b/server/store/adapters/rdbms/aux_types.gen.go index c5484deac..bf32c306e 100644 --- a/server/store/adapters/rdbms/aux_types.gen.go +++ b/server/store/adapters/rdbms/aux_types.gen.go @@ -309,8 +309,8 @@ type ( Handle string `db:"handle"` PageID uint64 `db:"page_id"` ParentID uint64 `db:"parent_id"` - ModuleID uint64 `db:"module_id"` NamespaceID uint64 `db:"namespace_id"` + Weight int `db:"weight"` Meta *composeType.PageLayoutMeta `db:"meta"` Primary bool `db:"primary"` Config composeType.PageLayoutConfig `db:"config"` @@ -1682,8 +1682,8 @@ func (aux *auxComposePageLayout) encode(res *composeType.PageLayout) (_ error) { aux.Handle = res.Handle aux.PageID = res.PageID aux.ParentID = res.ParentID - aux.ModuleID = res.ModuleID aux.NamespaceID = res.NamespaceID + aux.Weight = res.Weight aux.Meta = res.Meta aux.Primary = res.Primary aux.Config = res.Config @@ -1704,8 +1704,8 @@ func (aux auxComposePageLayout) decode() (res *composeType.PageLayout, _ error) res.Handle = aux.Handle res.PageID = aux.PageID res.ParentID = aux.ParentID - res.ModuleID = aux.ModuleID res.NamespaceID = aux.NamespaceID + res.Weight = aux.Weight res.Meta = aux.Meta res.Primary = aux.Primary res.Config = aux.Config @@ -1726,8 +1726,8 @@ func (aux *auxComposePageLayout) scan(row scanner) error { &aux.Handle, &aux.PageID, &aux.ParentID, - &aux.ModuleID, &aux.NamespaceID, + &aux.Weight, &aux.Meta, &aux.Primary, &aux.Config, diff --git a/server/store/adapters/rdbms/custom_compose_page_layouts.go b/server/store/adapters/rdbms/custom_compose_page_layouts.go new file mode 100644 index 000000000..136c69744 --- /dev/null +++ b/server/store/adapters/rdbms/custom_compose_page_layouts.go @@ -0,0 +1,61 @@ +package rdbms + +import ( + "context" + + composeType "github.com/cortezaproject/corteza/server/compose/types" + "github.com/doug-martin/goqu/v9" +) + +func (s Store) ReorderComposePageLayouts(ctx context.Context, namespaceID uint64, pageID uint64, pageLayoutLayoutIDs []uint64) (err error) { + var ( + pageLayouts composeType.PageLayoutSet + pageLayoutMap = map[uint64]bool{} + weight = 1 + + f = composeType.PageLayoutFilter{PageID: pageID, NamespaceID: namespaceID} + + query = func(id uint64, weight int) *goqu.UpdateDataset { + return s.Dialect.GOQU(). + Update(composePageLayoutTable). + Set(goqu.Record{"weight": weight}). + Where(goqu.C("id").Eq(id)) + } + ) + + if pageLayouts, _, err = s.SearchComposePageLayouts(ctx, f); err != nil { + return + } + + for _, app := range pageLayouts { + pageLayoutMap[app.ID] = true + } + + // honor parameter first + for _, id := range pageLayoutLayoutIDs { + if pageLayoutMap[id] { + pageLayoutMap[id] = false + + if err = s.Exec(ctx, query(id, weight)); err != nil { + return + } + + weight++ + } + } + + for id, update := range pageLayoutMap { + if !update { + continue + } + + if err = s.Exec(ctx, query(id, weight)); err != nil { + return + } + + weight++ + + } + + return +} diff --git a/server/store/adapters/rdbms/filters.gen.go b/server/store/adapters/rdbms/filters.gen.go index ac92cb2bd..15b1470ec 100644 --- a/server/store/adapters/rdbms/filters.gen.go +++ b/server/store/adapters/rdbms/filters.gen.go @@ -706,18 +706,10 @@ func ComposePageLayoutFilter(d drivers.Dialect, f composeType.PageLayoutFilter) ee = append(ee, goqu.C("rel_namespace").Eq(f.NamespaceID)) } - if f.ModuleID > 0 { - ee = append(ee, goqu.C("rel_module").Eq(f.ModuleID)) - } - if f.PageID > 0 { ee = append(ee, goqu.C("page_id").Eq(f.PageID)) } - if f.ModuleID > 0 { - ee = append(ee, goqu.C("rel_module").Eq(f.ModuleID)) - } - if len(f.LabeledIDs) > 0 { ee = append(ee, goqu.I("id").In(f.LabeledIDs)) } diff --git a/server/store/adapters/rdbms/queries.gen.go b/server/store/adapters/rdbms/queries.gen.go index 11a73f684..5bab0d2cd 100644 --- a/server/store/adapters/rdbms/queries.gen.go +++ b/server/store/adapters/rdbms/queries.gen.go @@ -2093,8 +2093,8 @@ var ( "handle", "page_id", "parent_id", - "rel_module", "rel_namespace", + "weight", "meta", "primary", "config", @@ -2116,8 +2116,8 @@ var ( "handle": res.Handle, "page_id": res.PageID, "parent_id": res.ParentID, - "rel_module": res.ModuleID, "rel_namespace": res.NamespaceID, + "weight": res.Weight, "meta": res.Meta, "primary": res.Primary, "config": res.Config, @@ -2142,8 +2142,8 @@ var ( "handle": res.Handle, "page_id": res.PageID, "parent_id": res.ParentID, - "rel_module": res.ModuleID, "rel_namespace": res.NamespaceID, + "weight": res.Weight, "meta": res.Meta, "primary": res.Primary, "config": res.Config, @@ -2166,8 +2166,8 @@ var ( "handle": res.Handle, "page_id": res.PageID, "parent_id": res.ParentID, - "rel_module": res.ModuleID, "rel_namespace": res.NamespaceID, + "weight": res.Weight, "meta": res.Meta, "primary": res.Primary, "config": res.Config, diff --git a/server/store/adapters/rdbms/rdbms.gen.go b/server/store/adapters/rdbms/rdbms.gen.go index fb786347a..5d457749f 100644 --- a/server/store/adapters/rdbms/rdbms.gen.go +++ b/server/store/adapters/rdbms/rdbms.gen.go @@ -10172,48 +10172,6 @@ func (s *Store) LookupComposePageLayoutByNamespaceIDHandle(ctx context.Context, return aux.decode() } -// LookupComposePageLayoutByNamespaceIDModuleID searches for page layour by moduleID -// -// This function is auto-generated -func (s *Store) LookupComposePageLayoutByNamespaceIDModuleID(ctx context.Context, namespaceID uint64, moduleID uint64) (_ *composeType.PageLayout, err error) { - var ( - rows *sql.Rows - aux = new(auxComposePageLayout) - lookup = composePageLayoutSelectQuery(s.Dialect.GOQU()).Where( - goqu.I("rel_namespace").Eq(namespaceID), - goqu.I("rel_module").Eq(moduleID), - stateNilComparison(s.Dialect, "deleted_at", filter.StateExcluded), - ).Limit(1) - ) - - rows, err = s.Query(ctx, lookup) - if err != nil { - return - } - - defer func() { - closeError := rows.Close() - if err == nil { - // return error from close - err = closeError - } - }() - - if err = rows.Err(); err != nil { - return - } - - if !rows.Next() { - return nil, store.ErrNotFound.Stack(1) - } - - if err = aux.scan(rows); err != nil { - return - } - - return aux.decode() -} - // LookupComposePageLayoutByID searches for compose page layour by ID // // It returns compose page layour even if deleted @@ -10276,6 +10234,7 @@ func (Store) sortableComposePageLayoutFields() map[string]string { "parentid": "parent_id", "updated_at": "updated_at", "updatedat": "updated_at", + "weight": "weight", } } @@ -10312,6 +10271,8 @@ func (s *Store) collectComposePageLayoutCursorValues(res *composeType.PageLayout return res.PageID case "parentID": return res.ParentID + case "weight": + return res.Weight case "createdAt": return res.CreatedAt case "updatedAt": diff --git a/server/store/interfaces.gen.go b/server/store/interfaces.gen.go index 87baa0c1c..4aa173ee1 100644 --- a/server/store/interfaces.gen.go +++ b/server/store/interfaces.gen.go @@ -339,8 +339,8 @@ type ( DeleteComposePageLayoutByID(ctx context.Context, id uint64) error TruncateComposePageLayouts(ctx context.Context) error LookupComposePageLayoutByNamespaceIDHandle(ctx context.Context, namespaceID uint64, handle string) (*composeType.PageLayout, error) - LookupComposePageLayoutByNamespaceIDModuleID(ctx context.Context, namespaceID uint64, moduleID uint64) (*composeType.PageLayout, error) LookupComposePageLayoutByID(ctx context.Context, id uint64) (*composeType.PageLayout, error) + ReorderComposePageLayouts(ctx context.Context, namespace_id uint64, page_id uint64, page_layout_ids []uint64) error } Credentials interface { @@ -1904,13 +1904,6 @@ func LookupComposePageLayoutByNamespaceIDHandle(ctx context.Context, s ComposePa return s.LookupComposePageLayoutByNamespaceIDHandle(ctx, namespaceID, handle) } -// LookupComposePageLayoutByNamespaceIDModuleID searches for page layour by moduleID -// -// This function is auto-generated -func LookupComposePageLayoutByNamespaceIDModuleID(ctx context.Context, s ComposePageLayouts, namespaceID uint64, moduleID uint64) (*composeType.PageLayout, error) { - return s.LookupComposePageLayoutByNamespaceIDModuleID(ctx, namespaceID, moduleID) -} - // LookupComposePageLayoutByID searches for compose page layour by ID // // It returns compose page layour even if deleted @@ -1920,6 +1913,13 @@ func LookupComposePageLayoutByID(ctx context.Context, s ComposePageLayouts, id u return s.LookupComposePageLayoutByID(ctx, id) } +// ReorderComposePageLayouts +// +// This function is auto-generated +func ReorderComposePageLayouts(ctx context.Context, s ComposePageLayouts, namespace_id uint64, page_id uint64, page_layout_ids []uint64) error { + return s.ReorderComposePageLayouts(ctx, namespace_id, page_id, page_layout_ids) +} + // SearchCredentials returns all matching Credentials from store // // This function is auto-generated diff --git a/server/system/automation/actionlog_handler.gen.go b/server/system/automation/actionlog_handler.gen.go index 6461b30d5..6cfd6fb30 100644 --- a/server/system/automation/actionlog_handler.gen.go +++ b/server/system/automation/actionlog_handler.gen.go @@ -69,10 +69,9 @@ type ( // Search function Action log search // // expects implementation of search function: -// -// func (h actionlogHandler) search(ctx context.Context, args *actionlogSearchArgs) (results *actionlogSearchResults, err error) { -// return -// } +// func (h actionlogHandler) search(ctx context.Context, args *actionlogSearchArgs) (results *actionlogSearchResults, err error) { +// return +// } func (h actionlogHandler) Search() *atypes.Function { return &atypes.Function{ Ref: "actionlogSearch", @@ -211,10 +210,9 @@ type ( // Each function Action log // // expects implementation of each function: -// -// func (h actionlogHandler) each(ctx context.Context, args *actionlogEachArgs) (results *actionlogEachResults, err error) { -// return -// } +// func (h actionlogHandler) each(ctx context.Context, args *actionlogEachArgs) (results *actionlogEachResults, err error) { +// return +// } func (h actionlogHandler) Each() *atypes.Function { return &atypes.Function{ Ref: "actionlogEach", @@ -315,10 +313,9 @@ type ( // Record function Record action into action log // // expects implementation of record function: -// -// func (h actionlogHandler) record(ctx context.Context, args *actionlogRecordArgs) (err error) { -// return -// } +// func (h actionlogHandler) record(ctx context.Context, args *actionlogRecordArgs) (err error) { +// return +// } func (h actionlogHandler) Record() *atypes.Function { return &atypes.Function{ Ref: "actionlogRecord", diff --git a/server/system/automation/expr_types.gen.go b/server/system/automation/expr_types.gen.go index 213b98fd3..98190b1ad 100644 --- a/server/system/automation/expr_types.gen.go +++ b/server/system/automation/expr_types.gen.go @@ -178,6 +178,7 @@ func (t *QueueMessage) AssignFieldValue(key string, val TypedValue) error { // // It allows gval lib to access QueueMessage's underlying value (*types.QueueMessage) // and it's fields +// func (t *QueueMessage) SelectGVal(ctx context.Context, k string) (interface{}, error) { t.mux.RLock() defer t.mux.RUnlock() @@ -416,6 +417,7 @@ func (t *RenderedDocument) AssignFieldValue(key string, val TypedValue) error { // // It allows gval lib to access RenderedDocument's underlying value (*renderedDocument) // and it's fields +// func (t *RenderedDocument) SelectGVal(ctx context.Context, k string) (interface{}, error) { t.mux.RLock() defer t.mux.RUnlock() @@ -570,6 +572,7 @@ func (t *Role) AssignFieldValue(key string, val TypedValue) error { // // It allows gval lib to access Role's underlying value (*types.Role) // and it's fields +// func (t *Role) SelectGVal(ctx context.Context, k string) (interface{}, error) { t.mux.RLock() defer t.mux.RUnlock() @@ -764,6 +767,7 @@ func (t *Template) AssignFieldValue(key string, val TypedValue) error { // // It allows gval lib to access Template's underlying value (*types.Template) // and it's fields +// func (t *Template) SelectGVal(ctx context.Context, k string) (interface{}, error) { t.mux.RLock() defer t.mux.RUnlock() @@ -1022,6 +1026,7 @@ func (t *TemplateMeta) AssignFieldValue(key string, val TypedValue) error { // // It allows gval lib to access TemplateMeta's underlying value (types.TemplateMeta) // and it's fields +// func (t *TemplateMeta) SelectGVal(ctx context.Context, k string) (interface{}, error) { t.mux.RLock() defer t.mux.RUnlock() @@ -1156,6 +1161,7 @@ func (t *User) AssignFieldValue(key string, val TypedValue) error { // // It allows gval lib to access User's underlying value (*types.User) // and it's fields +// func (t *User) SelectGVal(ctx context.Context, k string) (interface{}, error) { t.mux.RLock() defer t.mux.RUnlock() diff --git a/server/system/automation/rbac_handler.gen.go b/server/system/automation/rbac_handler.gen.go index 136b4ebda..ba537a9e8 100644 --- a/server/system/automation/rbac_handler.gen.go +++ b/server/system/automation/rbac_handler.gen.go @@ -58,10 +58,9 @@ func (a rbacAllowArgs) GetRole() (bool, uint64, string, *types.Role) { // Allow function RBAC: Allow operation on resource to a role // // expects implementation of allow function: -// -// func (h rbacHandler) allow(ctx context.Context, args *rbacAllowArgs) (err error) { -// return -// } +// func (h rbacHandler) allow(ctx context.Context, args *rbacAllowArgs) (err error) { +// return +// } func (h rbacHandler) Allow() *atypes.Function { return &atypes.Function{ Ref: "rbacAllow", @@ -140,10 +139,9 @@ func (a rbacDenyArgs) GetRole() (bool, uint64, string, *types.Role) { // Deny function RBAC: Deny operation on resource to a role // // expects implementation of deny function: -// -// func (h rbacHandler) deny(ctx context.Context, args *rbacDenyArgs) (err error) { -// return -// } +// func (h rbacHandler) deny(ctx context.Context, args *rbacDenyArgs) (err error) { +// return +// } func (h rbacHandler) Deny() *atypes.Function { return &atypes.Function{ Ref: "rbacDeny", @@ -222,10 +220,9 @@ func (a rbacInheritArgs) GetRole() (bool, uint64, string, *types.Role) { // Inherit function RBAC: Remove allow/deny operation of a role from resource // // expects implementation of inherit function: -// -// func (h rbacHandler) inherit(ctx context.Context, args *rbacInheritArgs) (err error) { -// return -// } +// func (h rbacHandler) inherit(ctx context.Context, args *rbacInheritArgs) (err error) { +// return +// } func (h rbacHandler) Inherit() *atypes.Function { return &atypes.Function{ Ref: "rbacInherit", @@ -301,10 +298,9 @@ type ( // Check function RBAC: Can user perform an operation on a resource // // expects implementation of check function: -// -// func (h rbacHandler) check(ctx context.Context, args *rbacCheckArgs) (results *rbacCheckResults, err error) { -// return -// } +// func (h rbacHandler) check(ctx context.Context, args *rbacCheckArgs) (results *rbacCheckResults, err error) { +// return +// } func (h rbacHandler) Check() *atypes.Function { return &atypes.Function{ Ref: "rbacCheck", diff --git a/server/system/automation/roles_handler.gen.go b/server/system/automation/roles_handler.gen.go index 9f1ff1109..d2db0cc76 100644 --- a/server/system/automation/roles_handler.gen.go +++ b/server/system/automation/roles_handler.gen.go @@ -64,10 +64,9 @@ func (a rolesLookupArgs) GetLookup() (bool, uint64, string, *types.Role) { // Lookup function Role lookup // // expects implementation of lookup function: -// -// func (h rolesHandler) lookup(ctx context.Context, args *rolesLookupArgs) (results *rolesLookupResults, err error) { -// return -// } +// func (h rolesHandler) lookup(ctx context.Context, args *rolesLookupArgs) (results *rolesLookupResults, err error) { +// return +// } func (h rolesHandler) Lookup() *atypes.Function { return &atypes.Function{ Ref: "rolesLookup", @@ -164,10 +163,9 @@ func (a rolesSearchMembersArgs) GetLookup() (bool, uint64, string, *types.Role) // SearchMembers function Role members search // // expects implementation of searchMembers function: -// -// func (h rolesHandler) searchMembers(ctx context.Context, args *rolesSearchMembersArgs) (results *rolesSearchMembersResults, err error) { -// return -// } +// func (h rolesHandler) searchMembers(ctx context.Context, args *rolesSearchMembersArgs) (results *rolesSearchMembersResults, err error) { +// return +// } func (h rolesHandler) SearchMembers() *atypes.Function { return &atypes.Function{ Ref: "rolesSearchMembers", @@ -290,10 +288,9 @@ func (a rolesEachMemberArgs) GetLookup() (bool, uint64, string, *types.Role) { // EachMember function Iterate over role members // // expects implementation of eachMember function: -// -// func (h rolesHandler) eachMember(ctx context.Context, args *rolesEachMemberArgs) (results *rolesEachMemberResults, err error) { -// return -// } +// func (h rolesHandler) eachMember(ctx context.Context, args *rolesEachMemberArgs) (results *rolesEachMemberResults, err error) { +// return +// } func (h rolesHandler) EachMember() *atypes.Function { return &atypes.Function{ Ref: "rolesEachMember", @@ -380,10 +377,9 @@ func (a rolesAddMemberArgs) GetUser() (bool, uint64, string, string, *types.User // AddMember function Role membership add // // expects implementation of addMember function: -// -// func (h rolesHandler) addMember(ctx context.Context, args *rolesAddMemberArgs) (err error) { -// return -// } +// func (h rolesHandler) addMember(ctx context.Context, args *rolesAddMemberArgs) (err error) { +// return +// } func (h rolesHandler) AddMember() *atypes.Function { return &atypes.Function{ Ref: "rolesAddMember", @@ -477,10 +473,9 @@ func (a rolesRemoveMemberArgs) GetUser() (bool, uint64, string, string, *types.U // RemoveMember function Role membership remove // // expects implementation of removeMember function: -// -// func (h rolesHandler) removeMember(ctx context.Context, args *rolesRemoveMemberArgs) (err error) { -// return -// } +// func (h rolesHandler) removeMember(ctx context.Context, args *rolesRemoveMemberArgs) (err error) { +// return +// } func (h rolesHandler) RemoveMember() *atypes.Function { return &atypes.Function{ Ref: "rolesRemoveMember", @@ -594,10 +589,9 @@ type ( // Search function Roles search // // expects implementation of search function: -// -// func (h rolesHandler) search(ctx context.Context, args *rolesSearchArgs) (results *rolesSearchResults, err error) { -// return -// } +// func (h rolesHandler) search(ctx context.Context, args *rolesSearchArgs) (results *rolesSearchResults, err error) { +// return +// } func (h rolesHandler) Search() *atypes.Function { return &atypes.Function{ Ref: "rolesSearch", @@ -787,10 +781,9 @@ type ( // Each function Roles // // expects implementation of each function: -// -// func (h rolesHandler) each(ctx context.Context, args *rolesEachArgs) (results *rolesEachResults, err error) { -// return -// } +// func (h rolesHandler) each(ctx context.Context, args *rolesEachArgs) (results *rolesEachResults, err error) { +// return +// } func (h rolesHandler) Each() *atypes.Function { return &atypes.Function{ Ref: "rolesEach", @@ -905,10 +898,9 @@ type ( // Create function Role creator // // expects implementation of create function: -// -// func (h rolesHandler) create(ctx context.Context, args *rolesCreateArgs) (results *rolesCreateResults, err error) { -// return -// } +// func (h rolesHandler) create(ctx context.Context, args *rolesCreateArgs) (results *rolesCreateResults, err error) { +// return +// } func (h rolesHandler) Create() *atypes.Function { return &atypes.Function{ Ref: "rolesCreate", @@ -983,10 +975,9 @@ type ( // Update function Role update // // expects implementation of update function: -// -// func (h rolesHandler) update(ctx context.Context, args *rolesUpdateArgs) (results *rolesUpdateResults, err error) { -// return -// } +// func (h rolesHandler) update(ctx context.Context, args *rolesUpdateArgs) (results *rolesUpdateResults, err error) { +// return +// } func (h rolesHandler) Update() *atypes.Function { return &atypes.Function{ Ref: "rolesUpdate", @@ -1064,10 +1055,9 @@ func (a rolesDeleteArgs) GetLookup() (bool, uint64, string, *types.Role) { // Delete function Role delete // // expects implementation of delete function: -// -// func (h rolesHandler) delete(ctx context.Context, args *rolesDeleteArgs) (err error) { -// return -// } +// func (h rolesHandler) delete(ctx context.Context, args *rolesDeleteArgs) (err error) { +// return +// } func (h rolesHandler) Delete() *atypes.Function { return &atypes.Function{ Ref: "rolesDelete", @@ -1130,10 +1120,9 @@ func (a rolesRecoverArgs) GetLookup() (bool, uint64, string, *types.Role) { // Recover function Role recover // // expects implementation of recover function: -// -// func (h rolesHandler) recover(ctx context.Context, args *rolesRecoverArgs) (err error) { -// return -// } +// func (h rolesHandler) recover(ctx context.Context, args *rolesRecoverArgs) (err error) { +// return +// } func (h rolesHandler) Recover() *atypes.Function { return &atypes.Function{ Ref: "rolesRecover", @@ -1196,10 +1185,9 @@ func (a rolesArchiveArgs) GetLookup() (bool, uint64, string, *types.Role) { // Archive function Role archive // // expects implementation of archive function: -// -// func (h rolesHandler) archive(ctx context.Context, args *rolesArchiveArgs) (err error) { -// return -// } +// func (h rolesHandler) archive(ctx context.Context, args *rolesArchiveArgs) (err error) { +// return +// } func (h rolesHandler) Archive() *atypes.Function { return &atypes.Function{ Ref: "rolesArchive", @@ -1262,10 +1250,9 @@ func (a rolesUnarchiveArgs) GetLookup() (bool, uint64, string, *types.Role) { // Unarchive function Role unarchive // // expects implementation of unarchive function: -// -// func (h rolesHandler) unarchive(ctx context.Context, args *rolesUnarchiveArgs) (err error) { -// return -// } +// func (h rolesHandler) unarchive(ctx context.Context, args *rolesUnarchiveArgs) (err error) { +// return +// } func (h rolesHandler) Unarchive() *atypes.Function { return &atypes.Function{ Ref: "rolesUnarchive", diff --git a/server/system/automation/templates_handler.gen.go b/server/system/automation/templates_handler.gen.go index 429b86456..0d229abf5 100644 --- a/server/system/automation/templates_handler.gen.go +++ b/server/system/automation/templates_handler.gen.go @@ -59,10 +59,9 @@ func (a templatesLookupArgs) GetLookup() (bool, uint64, string, *types.Template) // Lookup function Template lookup // // expects implementation of lookup function: -// -// func (h templatesHandler) lookup(ctx context.Context, args *templatesLookupArgs) (results *templatesLookupResults, err error) { -// return -// } +// func (h templatesHandler) lookup(ctx context.Context, args *templatesLookupArgs) (results *templatesLookupResults, err error) { +// return +// } func (h templatesHandler) Lookup() *atypes.Function { return &atypes.Function{ Ref: "templatesLookup", @@ -179,10 +178,9 @@ type ( // Search function Templates search // // expects implementation of search function: -// -// func (h templatesHandler) search(ctx context.Context, args *templatesSearchArgs) (results *templatesSearchResults, err error) { -// return -// } +// func (h templatesHandler) search(ctx context.Context, args *templatesSearchArgs) (results *templatesSearchResults, err error) { +// return +// } func (h templatesHandler) Search() *atypes.Function { return &atypes.Function{ Ref: "templatesSearch", @@ -356,10 +354,9 @@ type ( // Each function Templates // // expects implementation of each function: -// -// func (h templatesHandler) each(ctx context.Context, args *templatesEachArgs) (results *templatesEachResults, err error) { -// return -// } +// func (h templatesHandler) each(ctx context.Context, args *templatesEachArgs) (results *templatesEachResults, err error) { +// return +// } func (h templatesHandler) Each() *atypes.Function { return &atypes.Function{ Ref: "templatesEach", @@ -464,10 +461,9 @@ type ( // Create function Template create // // expects implementation of create function: -// -// func (h templatesHandler) create(ctx context.Context, args *templatesCreateArgs) (results *templatesCreateResults, err error) { -// return -// } +// func (h templatesHandler) create(ctx context.Context, args *templatesCreateArgs) (results *templatesCreateResults, err error) { +// return +// } func (h templatesHandler) Create() *atypes.Function { return &atypes.Function{ Ref: "templatesCreate", @@ -542,10 +538,9 @@ type ( // Update function Template update // // expects implementation of update function: -// -// func (h templatesHandler) update(ctx context.Context, args *templatesUpdateArgs) (results *templatesUpdateResults, err error) { -// return -// } +// func (h templatesHandler) update(ctx context.Context, args *templatesUpdateArgs) (results *templatesUpdateResults, err error) { +// return +// } func (h templatesHandler) Update() *atypes.Function { return &atypes.Function{ Ref: "templatesUpdate", @@ -623,10 +618,9 @@ func (a templatesDeleteArgs) GetLookup() (bool, uint64, string, *types.Template) // Delete function Template delete // // expects implementation of delete function: -// -// func (h templatesHandler) delete(ctx context.Context, args *templatesDeleteArgs) (err error) { -// return -// } +// func (h templatesHandler) delete(ctx context.Context, args *templatesDeleteArgs) (err error) { +// return +// } func (h templatesHandler) Delete() *atypes.Function { return &atypes.Function{ Ref: "templatesDelete", @@ -689,10 +683,9 @@ func (a templatesRecoverArgs) GetLookup() (bool, uint64, string, *types.Template // Recover function Template recover // // expects implementation of recover function: -// -// func (h templatesHandler) recover(ctx context.Context, args *templatesRecoverArgs) (err error) { -// return -// } +// func (h templatesHandler) recover(ctx context.Context, args *templatesRecoverArgs) (err error) { +// return +// } func (h templatesHandler) Recover() *atypes.Function { return &atypes.Function{ Ref: "templatesRecover", @@ -771,10 +764,9 @@ func (a templatesRenderArgs) GetLookup() (bool, uint64, string, *types.Template) // Render function Template render // // expects implementation of render function: -// -// func (h templatesHandler) render(ctx context.Context, args *templatesRenderArgs) (results *templatesRenderResults, err error) { -// return -// } +// func (h templatesHandler) render(ctx context.Context, args *templatesRenderArgs) (results *templatesRenderResults, err error) { +// return +// } func (h templatesHandler) Render() *atypes.Function { return &atypes.Function{ Ref: "templatesRender", diff --git a/server/system/automation/users_handler.gen.go b/server/system/automation/users_handler.gen.go index ce6fc32e2..4de236daa 100644 --- a/server/system/automation/users_handler.gen.go +++ b/server/system/automation/users_handler.gen.go @@ -63,10 +63,9 @@ func (a usersLookupArgs) GetLookup() (bool, uint64, string, string, *types.User) // Lookup function User lookup // // expects implementation of lookup function: -// -// func (h usersHandler) lookup(ctx context.Context, args *usersLookupArgs) (results *usersLookupResults, err error) { -// return -// } +// func (h usersHandler) lookup(ctx context.Context, args *usersLookupArgs) (results *usersLookupResults, err error) { +// return +// } func (h usersHandler) Lookup() *atypes.Function { return &atypes.Function{ Ref: "usersLookup", @@ -166,10 +165,9 @@ func (a usersSearchMembershipArgs) GetLookup() (bool, uint64, string, string, *t // SearchMembership function User role search // // expects implementation of searchMembership function: -// -// func (h usersHandler) searchMembership(ctx context.Context, args *usersSearchMembershipArgs) (results *usersSearchMembershipResults, err error) { -// return -// } +// func (h usersHandler) searchMembership(ctx context.Context, args *usersSearchMembershipArgs) (results *usersSearchMembershipResults, err error) { +// return +// } func (h usersHandler) SearchMembership() *atypes.Function { return &atypes.Function{ Ref: "usersSearchMembership", @@ -304,10 +302,9 @@ func (a usersCheckMembershipArgs) GetRole() (bool, uint64, string, *types.Role) // CheckMembership function User membership check // // expects implementation of checkMembership function: -// -// func (h usersHandler) checkMembership(ctx context.Context, args *usersCheckMembershipArgs) (results *usersCheckMembershipResults, err error) { -// return -// } +// func (h usersHandler) checkMembership(ctx context.Context, args *usersCheckMembershipArgs) (results *usersCheckMembershipResults, err error) { +// return +// } func (h usersHandler) CheckMembership() *atypes.Function { return &atypes.Function{ Ref: "usersCheckMembership", @@ -447,10 +444,9 @@ type ( // Search function User search // // expects implementation of search function: -// -// func (h usersHandler) search(ctx context.Context, args *usersSearchArgs) (results *usersSearchResults, err error) { -// return -// } +// func (h usersHandler) search(ctx context.Context, args *usersSearchArgs) (results *usersSearchResults, err error) { +// return +// } func (h usersHandler) Search() *atypes.Function { return &atypes.Function{ Ref: "usersSearch", @@ -632,10 +628,9 @@ type ( // Each function Users // // expects implementation of each function: -// -// func (h usersHandler) each(ctx context.Context, args *usersEachArgs) (results *usersEachResults, err error) { -// return -// } +// func (h usersHandler) each(ctx context.Context, args *usersEachArgs) (results *usersEachResults, err error) { +// return +// } func (h usersHandler) Each() *atypes.Function { return &atypes.Function{ Ref: "usersEach", @@ -745,10 +740,9 @@ type ( // Create function User create // // expects implementation of create function: -// -// func (h usersHandler) create(ctx context.Context, args *usersCreateArgs) (results *usersCreateResults, err error) { -// return -// } +// func (h usersHandler) create(ctx context.Context, args *usersCreateArgs) (results *usersCreateResults, err error) { +// return +// } func (h usersHandler) Create() *atypes.Function { return &atypes.Function{ Ref: "usersCreate", @@ -823,10 +817,9 @@ type ( // Update function User update // // expects implementation of update function: -// -// func (h usersHandler) update(ctx context.Context, args *usersUpdateArgs) (results *usersUpdateResults, err error) { -// return -// } +// func (h usersHandler) update(ctx context.Context, args *usersUpdateArgs) (results *usersUpdateResults, err error) { +// return +// } func (h usersHandler) Update() *atypes.Function { return &atypes.Function{ Ref: "usersUpdate", @@ -905,10 +898,9 @@ func (a usersDeleteArgs) GetLookup() (bool, uint64, string, string, *types.User) // Delete function User delete // // expects implementation of delete function: -// -// func (h usersHandler) delete(ctx context.Context, args *usersDeleteArgs) (err error) { -// return -// } +// func (h usersHandler) delete(ctx context.Context, args *usersDeleteArgs) (err error) { +// return +// } func (h usersHandler) Delete() *atypes.Function { return &atypes.Function{ Ref: "usersDelete", @@ -974,10 +966,9 @@ func (a usersRecoverArgs) GetLookup() (bool, uint64, string, string, *types.User // Recover function User recover // // expects implementation of recover function: -// -// func (h usersHandler) recover(ctx context.Context, args *usersRecoverArgs) (err error) { -// return -// } +// func (h usersHandler) recover(ctx context.Context, args *usersRecoverArgs) (err error) { +// return +// } func (h usersHandler) Recover() *atypes.Function { return &atypes.Function{ Ref: "usersRecover", @@ -1043,10 +1034,9 @@ func (a usersSuspendArgs) GetLookup() (bool, uint64, string, string, *types.User // Suspend function User suspend // // expects implementation of suspend function: -// -// func (h usersHandler) suspend(ctx context.Context, args *usersSuspendArgs) (err error) { -// return -// } +// func (h usersHandler) suspend(ctx context.Context, args *usersSuspendArgs) (err error) { +// return +// } func (h usersHandler) Suspend() *atypes.Function { return &atypes.Function{ Ref: "usersSuspend", @@ -1112,10 +1102,9 @@ func (a usersUnsuspendArgs) GetLookup() (bool, uint64, string, string, *types.Us // Unsuspend function User unsuspend // // expects implementation of unsuspend function: -// -// func (h usersHandler) unsuspend(ctx context.Context, args *usersUnsuspendArgs) (err error) { -// return -// } +// func (h usersHandler) unsuspend(ctx context.Context, args *usersUnsuspendArgs) (err error) { +// return +// } func (h usersHandler) Unsuspend() *atypes.Function { return &atypes.Function{ Ref: "usersUnsuspend", diff --git a/server/system/automation/valuestore_handler.gen.go b/server/system/automation/valuestore_handler.gen.go index e0447518e..d301d9b13 100644 --- a/server/system/automation/valuestore_handler.gen.go +++ b/server/system/automation/valuestore_handler.gen.go @@ -44,10 +44,9 @@ type ( // Env function Get ENV variable // // expects implementation of env function: -// -// func (h valuestoreHandler) env(ctx context.Context, args *valuestoreEnvArgs) (results *valuestoreEnvResults, err error) { -// return -// } +// func (h valuestoreHandler) env(ctx context.Context, args *valuestoreEnvArgs) (results *valuestoreEnvResults, err error) { +// return +// } func (h valuestoreHandler) Env() *atypes.Function { return &atypes.Function{ Ref: "valuestoreEnv", diff --git a/server/system/service/access_control_actions.gen.go b/server/system/service/access_control_actions.gen.go index aa4d1d4e9..51a9860ef 100644 --- a/server/system/service/access_control_actions.gen.go +++ b/server/system/service/access_control_actions.gen.go @@ -52,6 +52,7 @@ var ( // setRule updates accessControlActionProps's rule // // This function is auto-generated. +// func (p *accessControlActionProps) setRule(rule *rbac.Rule) *accessControlActionProps { p.rule = rule return p @@ -60,6 +61,7 @@ func (p *accessControlActionProps) setRule(rule *rbac.Rule) *accessControlAction // Serialize converts accessControlActionProps to actionlog.Meta // // This function is auto-generated. +// func (p accessControlActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -78,6 +80,7 @@ func (p accessControlActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p accessControlActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -126,6 +129,7 @@ func (p accessControlActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *accessControlAction) String() string { var props = &accessControlActionProps{} @@ -153,6 +157,7 @@ func (e *accessControlAction) ToAction() *actionlog.Action { // AccessControlActionGrant returns "system:access_control.grant" action // // This function is auto-generated. +// func AccessControlActionGrant(props ...*accessControlActionProps) *accessControlAction { a := &accessControlAction{ timestamp: time.Now(), @@ -175,7 +180,9 @@ func AccessControlActionGrant(props ...*accessControlActionProps) *accessControl // AccessControlErrGeneric returns "system:access_control.generic" as *errors.Error // +// // This function is auto-generated. +// func AccessControlErrGeneric(mm ...*accessControlActionProps) *errors.Error { var p = &accessControlActionProps{} if len(mm) > 0 { @@ -209,7 +216,9 @@ func AccessControlErrGeneric(mm ...*accessControlActionProps) *errors.Error { // AccessControlErrNotAllowedToSetPermissions returns "system:access_control.notAllowedToSetPermissions" as *errors.Error // +// // This function is auto-generated. +// func AccessControlErrNotAllowedToSetPermissions(mm ...*accessControlActionProps) *errors.Error { var p = &accessControlActionProps{} if len(mm) > 0 { @@ -247,6 +256,7 @@ func AccessControlErrNotAllowedToSetPermissions(mm ...*accessControlActionProps) // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc accessControl) recordAction(ctx context.Context, props *accessControlActionProps, actionFn func(...*accessControlActionProps) *accessControlAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/apigw_filter_actions.gen.go b/server/system/service/apigw_filter_actions.gen.go index 4b6594be0..18fb192f2 100644 --- a/server/system/service/apigw_filter_actions.gen.go +++ b/server/system/service/apigw_filter_actions.gen.go @@ -53,6 +53,7 @@ var ( // setFilter updates apigwFilterActionProps's filter // // This function is auto-generated. +// func (p *apigwFilterActionProps) setFilter(filter *types.ApigwFilter) *apigwFilterActionProps { p.filter = filter return p @@ -61,6 +62,7 @@ func (p *apigwFilterActionProps) setFilter(filter *types.ApigwFilter) *apigwFilt // setSearch updates apigwFilterActionProps's search // // This function is auto-generated. +// func (p *apigwFilterActionProps) setSearch(search *types.ApigwFilterFilter) *apigwFilterActionProps { p.search = search return p @@ -69,6 +71,7 @@ func (p *apigwFilterActionProps) setSearch(search *types.ApigwFilterFilter) *api // Serialize converts apigwFilterActionProps to actionlog.Meta // // This function is auto-generated. +// func (p apigwFilterActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -88,6 +91,7 @@ func (p apigwFilterActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p apigwFilterActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -144,6 +148,7 @@ func (p apigwFilterActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *apigwFilterAction) String() string { var props = &apigwFilterActionProps{} @@ -171,6 +176,7 @@ func (e *apigwFilterAction) ToAction() *actionlog.Action { // ApigwFilterActionSearch returns "system:filter.search" action // // This function is auto-generated. +// func ApigwFilterActionSearch(props ...*apigwFilterActionProps) *apigwFilterAction { a := &apigwFilterAction{ timestamp: time.Now(), @@ -190,6 +196,7 @@ func ApigwFilterActionSearch(props ...*apigwFilterActionProps) *apigwFilterActio // ApigwFilterActionLookup returns "system:filter.lookup" action // // This function is auto-generated. +// func ApigwFilterActionLookup(props ...*apigwFilterActionProps) *apigwFilterAction { a := &apigwFilterAction{ timestamp: time.Now(), @@ -209,6 +216,7 @@ func ApigwFilterActionLookup(props ...*apigwFilterActionProps) *apigwFilterActio // ApigwFilterActionCreate returns "system:filter.create" action // // This function is auto-generated. +// func ApigwFilterActionCreate(props ...*apigwFilterActionProps) *apigwFilterAction { a := &apigwFilterAction{ timestamp: time.Now(), @@ -228,6 +236,7 @@ func ApigwFilterActionCreate(props ...*apigwFilterActionProps) *apigwFilterActio // ApigwFilterActionUpdate returns "system:filter.update" action // // This function is auto-generated. +// func ApigwFilterActionUpdate(props ...*apigwFilterActionProps) *apigwFilterAction { a := &apigwFilterAction{ timestamp: time.Now(), @@ -247,6 +256,7 @@ func ApigwFilterActionUpdate(props ...*apigwFilterActionProps) *apigwFilterActio // ApigwFilterActionDelete returns "system:filter.delete" action // // This function is auto-generated. +// func ApigwFilterActionDelete(props ...*apigwFilterActionProps) *apigwFilterAction { a := &apigwFilterAction{ timestamp: time.Now(), @@ -266,6 +276,7 @@ func ApigwFilterActionDelete(props ...*apigwFilterActionProps) *apigwFilterActio // ApigwFilterActionUndelete returns "system:filter.undelete" action // // This function is auto-generated. +// func ApigwFilterActionUndelete(props ...*apigwFilterActionProps) *apigwFilterAction { a := &apigwFilterAction{ timestamp: time.Now(), @@ -288,7 +299,9 @@ func ApigwFilterActionUndelete(props ...*apigwFilterActionProps) *apigwFilterAct // ApigwFilterErrGeneric returns "system:filter.generic" as *errors.Error // +// // This function is auto-generated. +// func ApigwFilterErrGeneric(mm ...*apigwFilterActionProps) *errors.Error { var p = &apigwFilterActionProps{} if len(mm) > 0 { @@ -322,7 +335,9 @@ func ApigwFilterErrGeneric(mm ...*apigwFilterActionProps) *errors.Error { // ApigwFilterErrNotFound returns "system:filter.notFound" as *errors.Error // +// // This function is auto-generated. +// func ApigwFilterErrNotFound(mm ...*apigwFilterActionProps) *errors.Error { var p = &apigwFilterActionProps{} if len(mm) > 0 { @@ -354,7 +369,9 @@ func ApigwFilterErrNotFound(mm ...*apigwFilterActionProps) *errors.Error { // ApigwFilterErrInvalidID returns "system:filter.invalidID" as *errors.Error // +// // This function is auto-generated. +// func ApigwFilterErrInvalidID(mm ...*apigwFilterActionProps) *errors.Error { var p = &apigwFilterActionProps{} if len(mm) > 0 { @@ -386,7 +403,9 @@ func ApigwFilterErrInvalidID(mm ...*apigwFilterActionProps) *errors.Error { // ApigwFilterErrInvalidRoute returns "system:filter.invalidRoute" as *errors.Error // +// // This function is auto-generated. +// func ApigwFilterErrInvalidRoute(mm ...*apigwFilterActionProps) *errors.Error { var p = &apigwFilterActionProps{} if len(mm) > 0 { @@ -418,7 +437,9 @@ func ApigwFilterErrInvalidRoute(mm ...*apigwFilterActionProps) *errors.Error { // ApigwFilterErrAsyncRouteTooManyProcessers returns "system:filter.asyncRouteTooManyProcessers" as *errors.Error // +// // This function is auto-generated. +// func ApigwFilterErrAsyncRouteTooManyProcessers(mm ...*apigwFilterActionProps) *errors.Error { var p = &apigwFilterActionProps{} if len(mm) > 0 { @@ -452,7 +473,9 @@ func ApigwFilterErrAsyncRouteTooManyProcessers(mm ...*apigwFilterActionProps) *e // ApigwFilterErrAsyncRouteTooManyAfterFilters returns "system:filter.asyncRouteTooManyAfterFilters" as *errors.Error // +// // This function is auto-generated. +// func ApigwFilterErrAsyncRouteTooManyAfterFilters(mm ...*apigwFilterActionProps) *errors.Error { var p = &apigwFilterActionProps{} if len(mm) > 0 { @@ -492,6 +515,7 @@ func ApigwFilterErrAsyncRouteTooManyAfterFilters(mm ...*apigwFilterActionProps) // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc apigwFilter) recordAction(ctx context.Context, props *apigwFilterActionProps, actionFn func(...*apigwFilterActionProps) *apigwFilterAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/apigw_route_actions.gen.go b/server/system/service/apigw_route_actions.gen.go index f5c3427e4..02de07ae8 100644 --- a/server/system/service/apigw_route_actions.gen.go +++ b/server/system/service/apigw_route_actions.gen.go @@ -55,6 +55,7 @@ var ( // setRoute updates apigwRouteActionProps's route // // This function is auto-generated. +// func (p *apigwRouteActionProps) setRoute(route *types.ApigwRoute) *apigwRouteActionProps { p.route = route return p @@ -63,6 +64,7 @@ func (p *apigwRouteActionProps) setRoute(route *types.ApigwRoute) *apigwRouteAct // setNew updates apigwRouteActionProps's new // // This function is auto-generated. +// func (p *apigwRouteActionProps) setNew(new *types.ApigwRoute) *apigwRouteActionProps { p.new = new return p @@ -71,6 +73,7 @@ func (p *apigwRouteActionProps) setNew(new *types.ApigwRoute) *apigwRouteActionP // setUpdate updates apigwRouteActionProps's update // // This function is auto-generated. +// func (p *apigwRouteActionProps) setUpdate(update *types.ApigwRoute) *apigwRouteActionProps { p.update = update return p @@ -79,6 +82,7 @@ func (p *apigwRouteActionProps) setUpdate(update *types.ApigwRoute) *apigwRouteA // setSearch updates apigwRouteActionProps's search // // This function is auto-generated. +// func (p *apigwRouteActionProps) setSearch(search *types.ApigwRouteFilter) *apigwRouteActionProps { p.search = search return p @@ -87,6 +91,7 @@ func (p *apigwRouteActionProps) setSearch(search *types.ApigwRouteFilter) *apigw // Serialize converts apigwRouteActionProps to actionlog.Meta // // This function is auto-generated. +// func (p apigwRouteActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -113,6 +118,7 @@ func (p apigwRouteActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p apigwRouteActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -194,6 +200,7 @@ func (p apigwRouteActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *apigwRouteAction) String() string { var props = &apigwRouteActionProps{} @@ -221,6 +228,7 @@ func (e *apigwRouteAction) ToAction() *actionlog.Action { // ApigwRouteActionSearch returns "system:apigw-route.search" action // // This function is auto-generated. +// func ApigwRouteActionSearch(props ...*apigwRouteActionProps) *apigwRouteAction { a := &apigwRouteAction{ timestamp: time.Now(), @@ -240,6 +248,7 @@ func ApigwRouteActionSearch(props ...*apigwRouteActionProps) *apigwRouteAction { // ApigwRouteActionLookup returns "system:apigw-route.lookup" action // // This function is auto-generated. +// func ApigwRouteActionLookup(props ...*apigwRouteActionProps) *apigwRouteAction { a := &apigwRouteAction{ timestamp: time.Now(), @@ -259,6 +268,7 @@ func ApigwRouteActionLookup(props ...*apigwRouteActionProps) *apigwRouteAction { // ApigwRouteActionCreate returns "system:apigw-route.create" action // // This function is auto-generated. +// func ApigwRouteActionCreate(props ...*apigwRouteActionProps) *apigwRouteAction { a := &apigwRouteAction{ timestamp: time.Now(), @@ -278,6 +288,7 @@ func ApigwRouteActionCreate(props ...*apigwRouteActionProps) *apigwRouteAction { // ApigwRouteActionUpdate returns "system:apigw-route.update" action // // This function is auto-generated. +// func ApigwRouteActionUpdate(props ...*apigwRouteActionProps) *apigwRouteAction { a := &apigwRouteAction{ timestamp: time.Now(), @@ -297,6 +308,7 @@ func ApigwRouteActionUpdate(props ...*apigwRouteActionProps) *apigwRouteAction { // ApigwRouteActionDelete returns "system:apigw-route.delete" action // // This function is auto-generated. +// func ApigwRouteActionDelete(props ...*apigwRouteActionProps) *apigwRouteAction { a := &apigwRouteAction{ timestamp: time.Now(), @@ -316,6 +328,7 @@ func ApigwRouteActionDelete(props ...*apigwRouteActionProps) *apigwRouteAction { // ApigwRouteActionUndelete returns "system:apigw-route.undelete" action // // This function is auto-generated. +// func ApigwRouteActionUndelete(props ...*apigwRouteActionProps) *apigwRouteAction { a := &apigwRouteAction{ timestamp: time.Now(), @@ -338,7 +351,9 @@ func ApigwRouteActionUndelete(props ...*apigwRouteActionProps) *apigwRouteAction // ApigwRouteErrGeneric returns "system:apigw-route.generic" as *errors.Error // +// // This function is auto-generated. +// func ApigwRouteErrGeneric(mm ...*apigwRouteActionProps) *errors.Error { var p = &apigwRouteActionProps{} if len(mm) > 0 { @@ -372,7 +387,9 @@ func ApigwRouteErrGeneric(mm ...*apigwRouteActionProps) *errors.Error { // ApigwRouteErrNotFound returns "system:apigw-route.notFound" as *errors.Error // +// // This function is auto-generated. +// func ApigwRouteErrNotFound(mm ...*apigwRouteActionProps) *errors.Error { var p = &apigwRouteActionProps{} if len(mm) > 0 { @@ -404,7 +421,9 @@ func ApigwRouteErrNotFound(mm ...*apigwRouteActionProps) *errors.Error { // ApigwRouteErrInvalidID returns "system:apigw-route.invalidID" as *errors.Error // +// // This function is auto-generated. +// func ApigwRouteErrInvalidID(mm ...*apigwRouteActionProps) *errors.Error { var p = &apigwRouteActionProps{} if len(mm) > 0 { @@ -436,7 +455,9 @@ func ApigwRouteErrInvalidID(mm ...*apigwRouteActionProps) *errors.Error { // ApigwRouteErrInvalidEndpoint returns "system:apigw-route.invalidEndpoint" as *errors.Error // +// // This function is auto-generated. +// func ApigwRouteErrInvalidEndpoint(mm ...*apigwRouteActionProps) *errors.Error { var p = &apigwRouteActionProps{} if len(mm) > 0 { @@ -468,7 +489,9 @@ func ApigwRouteErrInvalidEndpoint(mm ...*apigwRouteActionProps) *errors.Error { // ApigwRouteErrExistsEndpoint returns "system:apigw-route.existsEndpoint" as *errors.Error // +// // This function is auto-generated. +// func ApigwRouteErrExistsEndpoint(mm ...*apigwRouteActionProps) *errors.Error { var p = &apigwRouteActionProps{} if len(mm) > 0 { @@ -500,7 +523,9 @@ func ApigwRouteErrExistsEndpoint(mm ...*apigwRouteActionProps) *errors.Error { // ApigwRouteErrAlreadyExists returns "system:apigw-route.alreadyExists" as *errors.Error // +// // This function is auto-generated. +// func ApigwRouteErrAlreadyExists(mm ...*apigwRouteActionProps) *errors.Error { var p = &apigwRouteActionProps{} if len(mm) > 0 { @@ -532,7 +557,9 @@ func ApigwRouteErrAlreadyExists(mm ...*apigwRouteActionProps) *errors.Error { // ApigwRouteErrNotAllowedToCreate returns "system:apigw-route.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func ApigwRouteErrNotAllowedToCreate(mm ...*apigwRouteActionProps) *errors.Error { var p = &apigwRouteActionProps{} if len(mm) > 0 { @@ -566,7 +593,9 @@ func ApigwRouteErrNotAllowedToCreate(mm ...*apigwRouteActionProps) *errors.Error // ApigwRouteErrNotAllowedToRead returns "system:apigw-route.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func ApigwRouteErrNotAllowedToRead(mm ...*apigwRouteActionProps) *errors.Error { var p = &apigwRouteActionProps{} if len(mm) > 0 { @@ -600,7 +629,9 @@ func ApigwRouteErrNotAllowedToRead(mm ...*apigwRouteActionProps) *errors.Error { // ApigwRouteErrNotAllowedToSearch returns "system:apigw-route.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func ApigwRouteErrNotAllowedToSearch(mm ...*apigwRouteActionProps) *errors.Error { var p = &apigwRouteActionProps{} if len(mm) > 0 { @@ -634,7 +665,9 @@ func ApigwRouteErrNotAllowedToSearch(mm ...*apigwRouteActionProps) *errors.Error // ApigwRouteErrNotAllowedToUpdate returns "system:apigw-route.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func ApigwRouteErrNotAllowedToUpdate(mm ...*apigwRouteActionProps) *errors.Error { var p = &apigwRouteActionProps{} if len(mm) > 0 { @@ -668,7 +701,9 @@ func ApigwRouteErrNotAllowedToUpdate(mm ...*apigwRouteActionProps) *errors.Error // ApigwRouteErrNotAllowedToDelete returns "system:apigw-route.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func ApigwRouteErrNotAllowedToDelete(mm ...*apigwRouteActionProps) *errors.Error { var p = &apigwRouteActionProps{} if len(mm) > 0 { @@ -702,7 +737,9 @@ func ApigwRouteErrNotAllowedToDelete(mm ...*apigwRouteActionProps) *errors.Error // ApigwRouteErrNotAllowedToUndelete returns "system:apigw-route.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func ApigwRouteErrNotAllowedToUndelete(mm ...*apigwRouteActionProps) *errors.Error { var p = &apigwRouteActionProps{} if len(mm) > 0 { @@ -736,7 +773,9 @@ func ApigwRouteErrNotAllowedToUndelete(mm ...*apigwRouteActionProps) *errors.Err // ApigwRouteErrNotAllowedToExec returns "system:apigw-route.notAllowedToExec" as *errors.Error // +// // This function is auto-generated. +// func ApigwRouteErrNotAllowedToExec(mm ...*apigwRouteActionProps) *errors.Error { var p = &apigwRouteActionProps{} if len(mm) > 0 { @@ -776,6 +815,7 @@ func ApigwRouteErrNotAllowedToExec(mm ...*apigwRouteActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc apigwRoute) recordAction(ctx context.Context, props *apigwRouteActionProps, actionFn func(...*apigwRouteActionProps) *apigwRouteAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/application_actions.gen.go b/server/system/service/application_actions.gen.go index b068d09c5..ebe4fc0e7 100644 --- a/server/system/service/application_actions.gen.go +++ b/server/system/service/application_actions.gen.go @@ -55,6 +55,7 @@ var ( // setApplication updates applicationActionProps's application // // This function is auto-generated. +// func (p *applicationActionProps) setApplication(application *types.Application) *applicationActionProps { p.application = application return p @@ -63,6 +64,7 @@ func (p *applicationActionProps) setApplication(application *types.Application) // setNew updates applicationActionProps's new // // This function is auto-generated. +// func (p *applicationActionProps) setNew(new *types.Application) *applicationActionProps { p.new = new return p @@ -71,6 +73,7 @@ func (p *applicationActionProps) setNew(new *types.Application) *applicationActi // setUpdate updates applicationActionProps's update // // This function is auto-generated. +// func (p *applicationActionProps) setUpdate(update *types.Application) *applicationActionProps { p.update = update return p @@ -79,6 +82,7 @@ func (p *applicationActionProps) setUpdate(update *types.Application) *applicati // setFilter updates applicationActionProps's filter // // This function is auto-generated. +// func (p *applicationActionProps) setFilter(filter *types.ApplicationFilter) *applicationActionProps { p.filter = filter return p @@ -87,6 +91,7 @@ func (p *applicationActionProps) setFilter(filter *types.ApplicationFilter) *app // Serialize converts applicationActionProps to actionlog.Meta // // This function is auto-generated. +// func (p applicationActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -117,6 +122,7 @@ func (p applicationActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p applicationActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -207,6 +213,7 @@ func (p applicationActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *applicationAction) String() string { var props = &applicationActionProps{} @@ -234,6 +241,7 @@ func (e *applicationAction) ToAction() *actionlog.Action { // ApplicationActionSearch returns "system:application.search" action // // This function is auto-generated. +// func ApplicationActionSearch(props ...*applicationActionProps) *applicationAction { a := &applicationAction{ timestamp: time.Now(), @@ -253,6 +261,7 @@ func ApplicationActionSearch(props ...*applicationActionProps) *applicationActio // ApplicationActionReorder returns "system:application.reorder" action // // This function is auto-generated. +// func ApplicationActionReorder(props ...*applicationActionProps) *applicationAction { a := &applicationAction{ timestamp: time.Now(), @@ -272,6 +281,7 @@ func ApplicationActionReorder(props ...*applicationActionProps) *applicationActi // ApplicationActionLookup returns "system:application.lookup" action // // This function is auto-generated. +// func ApplicationActionLookup(props ...*applicationActionProps) *applicationAction { a := &applicationAction{ timestamp: time.Now(), @@ -291,6 +301,7 @@ func ApplicationActionLookup(props ...*applicationActionProps) *applicationActio // ApplicationActionCreate returns "system:application.create" action // // This function is auto-generated. +// func ApplicationActionCreate(props ...*applicationActionProps) *applicationAction { a := &applicationAction{ timestamp: time.Now(), @@ -310,6 +321,7 @@ func ApplicationActionCreate(props ...*applicationActionProps) *applicationActio // ApplicationActionUpdate returns "system:application.update" action // // This function is auto-generated. +// func ApplicationActionUpdate(props ...*applicationActionProps) *applicationAction { a := &applicationAction{ timestamp: time.Now(), @@ -329,6 +341,7 @@ func ApplicationActionUpdate(props ...*applicationActionProps) *applicationActio // ApplicationActionDelete returns "system:application.delete" action // // This function is auto-generated. +// func ApplicationActionDelete(props ...*applicationActionProps) *applicationAction { a := &applicationAction{ timestamp: time.Now(), @@ -348,6 +361,7 @@ func ApplicationActionDelete(props ...*applicationActionProps) *applicationActio // ApplicationActionUndelete returns "system:application.undelete" action // // This function is auto-generated. +// func ApplicationActionUndelete(props ...*applicationActionProps) *applicationAction { a := &applicationAction{ timestamp: time.Now(), @@ -367,6 +381,7 @@ func ApplicationActionUndelete(props ...*applicationActionProps) *applicationAct // ApplicationActionFlagManage returns "system:application.flagManage" action // // This function is auto-generated. +// func ApplicationActionFlagManage(props ...*applicationActionProps) *applicationAction { a := &applicationAction{ timestamp: time.Now(), @@ -386,6 +401,7 @@ func ApplicationActionFlagManage(props ...*applicationActionProps) *applicationA // ApplicationActionFlagManageGlobal returns "system:application.flagManageGlobal" action // // This function is auto-generated. +// func ApplicationActionFlagManageGlobal(props ...*applicationActionProps) *applicationAction { a := &applicationAction{ timestamp: time.Now(), @@ -408,7 +424,9 @@ func ApplicationActionFlagManageGlobal(props ...*applicationActionProps) *applic // ApplicationErrGeneric returns "system:application.generic" as *errors.Error // +// // This function is auto-generated. +// func ApplicationErrGeneric(mm ...*applicationActionProps) *errors.Error { var p = &applicationActionProps{} if len(mm) > 0 { @@ -442,7 +460,9 @@ func ApplicationErrGeneric(mm ...*applicationActionProps) *errors.Error { // ApplicationErrNotFound returns "system:application.notFound" as *errors.Error // +// // This function is auto-generated. +// func ApplicationErrNotFound(mm ...*applicationActionProps) *errors.Error { var p = &applicationActionProps{} if len(mm) > 0 { @@ -474,7 +494,9 @@ func ApplicationErrNotFound(mm ...*applicationActionProps) *errors.Error { // ApplicationErrInvalidID returns "system:application.invalidID" as *errors.Error // +// // This function is auto-generated. +// func ApplicationErrInvalidID(mm ...*applicationActionProps) *errors.Error { var p = &applicationActionProps{} if len(mm) > 0 { @@ -506,7 +528,9 @@ func ApplicationErrInvalidID(mm ...*applicationActionProps) *errors.Error { // ApplicationErrNotAllowedToRead returns "system:application.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func ApplicationErrNotAllowedToRead(mm ...*applicationActionProps) *errors.Error { var p = &applicationActionProps{} if len(mm) > 0 { @@ -540,7 +564,9 @@ func ApplicationErrNotAllowedToRead(mm ...*applicationActionProps) *errors.Error // ApplicationErrNotAllowedToSearch returns "system:application.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func ApplicationErrNotAllowedToSearch(mm ...*applicationActionProps) *errors.Error { var p = &applicationActionProps{} if len(mm) > 0 { @@ -574,7 +600,9 @@ func ApplicationErrNotAllowedToSearch(mm ...*applicationActionProps) *errors.Err // ApplicationErrNotAllowedToCreate returns "system:application.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func ApplicationErrNotAllowedToCreate(mm ...*applicationActionProps) *errors.Error { var p = &applicationActionProps{} if len(mm) > 0 { @@ -608,7 +636,9 @@ func ApplicationErrNotAllowedToCreate(mm ...*applicationActionProps) *errors.Err // ApplicationErrNotAllowedToUpdate returns "system:application.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func ApplicationErrNotAllowedToUpdate(mm ...*applicationActionProps) *errors.Error { var p = &applicationActionProps{} if len(mm) > 0 { @@ -642,7 +672,9 @@ func ApplicationErrNotAllowedToUpdate(mm ...*applicationActionProps) *errors.Err // ApplicationErrNotAllowedToDelete returns "system:application.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func ApplicationErrNotAllowedToDelete(mm ...*applicationActionProps) *errors.Error { var p = &applicationActionProps{} if len(mm) > 0 { @@ -676,7 +708,9 @@ func ApplicationErrNotAllowedToDelete(mm ...*applicationActionProps) *errors.Err // ApplicationErrNotAllowedToUndelete returns "system:application.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func ApplicationErrNotAllowedToUndelete(mm ...*applicationActionProps) *errors.Error { var p = &applicationActionProps{} if len(mm) > 0 { @@ -710,7 +744,9 @@ func ApplicationErrNotAllowedToUndelete(mm ...*applicationActionProps) *errors.E // ApplicationErrNotAllowedToManageFlag returns "system:application.notAllowedToManageFlag" as *errors.Error // +// // This function is auto-generated. +// func ApplicationErrNotAllowedToManageFlag(mm ...*applicationActionProps) *errors.Error { var p = &applicationActionProps{} if len(mm) > 0 { @@ -744,7 +780,9 @@ func ApplicationErrNotAllowedToManageFlag(mm ...*applicationActionProps) *errors // ApplicationErrNotAllowedToManageFlagGlobal returns "system:application.notAllowedToManageFlagGlobal" as *errors.Error // +// // This function is auto-generated. +// func ApplicationErrNotAllowedToManageFlagGlobal(mm ...*applicationActionProps) *errors.Error { var p = &applicationActionProps{} if len(mm) > 0 { @@ -784,6 +822,7 @@ func ApplicationErrNotAllowedToManageFlagGlobal(mm ...*applicationActionProps) * // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc application) recordAction(ctx context.Context, props *applicationActionProps, actionFn func(...*applicationActionProps) *applicationAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/attachment_actions.gen.go b/server/system/service/attachment_actions.gen.go index 36c511cea..9179ba631 100644 --- a/server/system/service/attachment_actions.gen.go +++ b/server/system/service/attachment_actions.gen.go @@ -57,6 +57,7 @@ var ( // setSize updates attachmentActionProps's size // // This function is auto-generated. +// func (p *attachmentActionProps) setSize(size int64) *attachmentActionProps { p.size = size return p @@ -65,6 +66,7 @@ func (p *attachmentActionProps) setSize(size int64) *attachmentActionProps { // setName updates attachmentActionProps's name // // This function is auto-generated. +// func (p *attachmentActionProps) setName(name string) *attachmentActionProps { p.name = name return p @@ -73,6 +75,7 @@ func (p *attachmentActionProps) setName(name string) *attachmentActionProps { // setMimetype updates attachmentActionProps's mimetype // // This function is auto-generated. +// func (p *attachmentActionProps) setMimetype(mimetype string) *attachmentActionProps { p.mimetype = mimetype return p @@ -81,6 +84,7 @@ func (p *attachmentActionProps) setMimetype(mimetype string) *attachmentActionPr // setUrl updates attachmentActionProps's url // // This function is auto-generated. +// func (p *attachmentActionProps) setUrl(url string) *attachmentActionProps { p.url = url return p @@ -89,6 +93,7 @@ func (p *attachmentActionProps) setUrl(url string) *attachmentActionProps { // setAttachment updates attachmentActionProps's attachment // // This function is auto-generated. +// func (p *attachmentActionProps) setAttachment(attachment *types.Attachment) *attachmentActionProps { p.attachment = attachment return p @@ -97,6 +102,7 @@ func (p *attachmentActionProps) setAttachment(attachment *types.Attachment) *att // setFilter updates attachmentActionProps's filter // // This function is auto-generated. +// func (p *attachmentActionProps) setFilter(filter *types.AttachmentFilter) *attachmentActionProps { p.filter = filter return p @@ -105,6 +111,7 @@ func (p *attachmentActionProps) setFilter(filter *types.AttachmentFilter) *attac // Serialize converts attachmentActionProps to actionlog.Meta // // This function is auto-generated. +// func (p attachmentActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -135,6 +142,7 @@ func (p attachmentActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p attachmentActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -209,6 +217,7 @@ func (p attachmentActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *attachmentAction) String() string { var props = &attachmentActionProps{} @@ -236,6 +245,7 @@ func (e *attachmentAction) ToAction() *actionlog.Action { // AttachmentActionSearch returns "system:attachment.search" action // // This function is auto-generated. +// func AttachmentActionSearch(props ...*attachmentActionProps) *attachmentAction { a := &attachmentAction{ timestamp: time.Now(), @@ -255,6 +265,7 @@ func AttachmentActionSearch(props ...*attachmentActionProps) *attachmentAction { // AttachmentActionLookup returns "system:attachment.lookup" action // // This function is auto-generated. +// func AttachmentActionLookup(props ...*attachmentActionProps) *attachmentAction { a := &attachmentAction{ timestamp: time.Now(), @@ -274,6 +285,7 @@ func AttachmentActionLookup(props ...*attachmentActionProps) *attachmentAction { // AttachmentActionCreate returns "system:attachment.create" action // // This function is auto-generated. +// func AttachmentActionCreate(props ...*attachmentActionProps) *attachmentAction { a := &attachmentAction{ timestamp: time.Now(), @@ -293,6 +305,7 @@ func AttachmentActionCreate(props ...*attachmentActionProps) *attachmentAction { // AttachmentActionDelete returns "system:attachment.delete" action // // This function is auto-generated. +// func AttachmentActionDelete(props ...*attachmentActionProps) *attachmentAction { a := &attachmentAction{ timestamp: time.Now(), @@ -315,7 +328,9 @@ func AttachmentActionDelete(props ...*attachmentActionProps) *attachmentAction { // AttachmentErrGeneric returns "system:attachment.generic" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrGeneric(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -349,7 +364,9 @@ func AttachmentErrGeneric(mm ...*attachmentActionProps) *errors.Error { // AttachmentErrNotFound returns "system:attachment.notFound" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotFound(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -381,7 +398,9 @@ func AttachmentErrNotFound(mm ...*attachmentActionProps) *errors.Error { // AttachmentErrInvalidID returns "system:attachment.invalidID" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrInvalidID(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -413,7 +432,9 @@ func AttachmentErrInvalidID(mm ...*attachmentActionProps) *errors.Error { // AttachmentErrNotAllowedToListAttachments returns "system:attachment.notAllowedToListAttachments" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToListAttachments(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -447,7 +468,9 @@ func AttachmentErrNotAllowedToListAttachments(mm ...*attachmentActionProps) *err // AttachmentErrNotAllowedToCreate returns "system:attachment.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToCreate(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -481,7 +504,9 @@ func AttachmentErrNotAllowedToCreate(mm ...*attachmentActionProps) *errors.Error // AttachmentErrNotAllowedToCreateEmptyAttachment returns "system:attachment.notAllowedToCreateEmptyAttachment" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrNotAllowedToCreateEmptyAttachment(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -515,7 +540,9 @@ func AttachmentErrNotAllowedToCreateEmptyAttachment(mm ...*attachmentActionProps // AttachmentErrFailedToExtractMimeType returns "system:attachment.failedToExtractMimeType" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrFailedToExtractMimeType(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -547,7 +574,9 @@ func AttachmentErrFailedToExtractMimeType(mm ...*attachmentActionProps) *errors. // AttachmentErrFailedToStoreFile returns "system:attachment.failedToStoreFile" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrFailedToStoreFile(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -579,7 +608,9 @@ func AttachmentErrFailedToStoreFile(mm ...*attachmentActionProps) *errors.Error // AttachmentErrFailedToProcessImage returns "system:attachment.failedToProcessImage" as *errors.Error // +// // This function is auto-generated. +// func AttachmentErrFailedToProcessImage(mm ...*attachmentActionProps) *errors.Error { var p = &attachmentActionProps{} if len(mm) > 0 { @@ -713,6 +744,7 @@ func AttachmentErrInvalidInitialsLength(mm ...*attachmentActionProps) *errors.Er // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc attachment) recordAction(ctx context.Context, props *attachmentActionProps, actionFn func(...*attachmentActionProps) *attachmentAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/auth_actions.gen.go b/server/system/service/auth_actions.gen.go index 3e4ffc9f3..d842baf40 100644 --- a/server/system/service/auth_actions.gen.go +++ b/server/system/service/auth_actions.gen.go @@ -56,6 +56,7 @@ var ( // setEmail updates authActionProps's email // // This function is auto-generated. +// func (p *authActionProps) setEmail(email string) *authActionProps { p.email = email return p @@ -64,6 +65,7 @@ func (p *authActionProps) setEmail(email string) *authActionProps { // setProvider updates authActionProps's provider // // This function is auto-generated. +// func (p *authActionProps) setProvider(provider string) *authActionProps { p.provider = provider return p @@ -72,6 +74,7 @@ func (p *authActionProps) setProvider(provider string) *authActionProps { // setCredentials updates authActionProps's credentials // // This function is auto-generated. +// func (p *authActionProps) setCredentials(credentials *types.Credential) *authActionProps { p.credentials = credentials return p @@ -80,6 +83,7 @@ func (p *authActionProps) setCredentials(credentials *types.Credential) *authAct // setRole updates authActionProps's role // // This function is auto-generated. +// func (p *authActionProps) setRole(role *types.Role) *authActionProps { p.role = role return p @@ -88,6 +92,7 @@ func (p *authActionProps) setRole(role *types.Role) *authActionProps { // setUser updates authActionProps's user // // This function is auto-generated. +// func (p *authActionProps) setUser(user *types.User) *authActionProps { p.user = user return p @@ -96,6 +101,7 @@ func (p *authActionProps) setUser(user *types.User) *authActionProps { // Serialize converts authActionProps to actionlog.Meta // // This function is auto-generated. +// func (p authActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -128,6 +134,7 @@ func (p authActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p authActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -214,6 +221,7 @@ func (p authActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *authAction) String() string { var props = &authActionProps{} @@ -241,6 +249,7 @@ func (e *authAction) ToAction() *actionlog.Action { // AuthActionAuthenticate returns "system:auth.authenticate" action // // This function is auto-generated. +// func AuthActionAuthenticate(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -260,6 +269,7 @@ func AuthActionAuthenticate(props ...*authActionProps) *authAction { // AuthActionIssueToken returns "system:auth.issueToken" action // // This function is auto-generated. +// func AuthActionIssueToken(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -279,6 +289,7 @@ func AuthActionIssueToken(props ...*authActionProps) *authAction { // AuthActionValidateToken returns "system:auth.validateToken" action // // This function is auto-generated. +// func AuthActionValidateToken(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -298,6 +309,7 @@ func AuthActionValidateToken(props ...*authActionProps) *authAction { // AuthActionChangePassword returns "system:auth.changePassword" action // // This function is auto-generated. +// func AuthActionChangePassword(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -317,6 +329,7 @@ func AuthActionChangePassword(props ...*authActionProps) *authAction { // AuthActionInternalSignup returns "system:auth.internalSignup" action // // This function is auto-generated. +// func AuthActionInternalSignup(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -336,6 +349,7 @@ func AuthActionInternalSignup(props ...*authActionProps) *authAction { // AuthActionConfirmEmail returns "system:auth.confirmEmail" action // // This function is auto-generated. +// func AuthActionConfirmEmail(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -355,6 +369,7 @@ func AuthActionConfirmEmail(props ...*authActionProps) *authAction { // AuthActionExternalSignup returns "system:auth.externalSignup" action // // This function is auto-generated. +// func AuthActionExternalSignup(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -374,6 +389,7 @@ func AuthActionExternalSignup(props ...*authActionProps) *authAction { // AuthActionSendEmailConfirmationToken returns "system:auth.sendEmailConfirmationToken" action // // This function is auto-generated. +// func AuthActionSendEmailConfirmationToken(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -393,6 +409,7 @@ func AuthActionSendEmailConfirmationToken(props ...*authActionProps) *authAction // AuthActionSendPasswordResetToken returns "system:auth.sendPasswordResetToken" action // // This function is auto-generated. +// func AuthActionSendPasswordResetToken(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -412,6 +429,7 @@ func AuthActionSendPasswordResetToken(props ...*authActionProps) *authAction { // AuthActionExchangePasswordResetToken returns "system:auth.exchangePasswordResetToken" action // // This function is auto-generated. +// func AuthActionExchangePasswordResetToken(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -431,6 +449,7 @@ func AuthActionExchangePasswordResetToken(props ...*authActionProps) *authAction // AuthActionGeneratePasswordCreateToken returns "system:auth.generatePasswordCreateToken" action // // This function is auto-generated. +// func AuthActionGeneratePasswordCreateToken(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -450,6 +469,7 @@ func AuthActionGeneratePasswordCreateToken(props ...*authActionProps) *authActio // AuthActionAutoPromote returns "system:auth.autoPromote" action // // This function is auto-generated. +// func AuthActionAutoPromote(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -469,6 +489,7 @@ func AuthActionAutoPromote(props ...*authActionProps) *authAction { // AuthActionUpdateCredentials returns "system:auth.updateCredentials" action // // This function is auto-generated. +// func AuthActionUpdateCredentials(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -488,6 +509,7 @@ func AuthActionUpdateCredentials(props ...*authActionProps) *authAction { // AuthActionCreateCredentials returns "system:auth.createCredentials" action // // This function is auto-generated. +// func AuthActionCreateCredentials(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -507,6 +529,7 @@ func AuthActionCreateCredentials(props ...*authActionProps) *authAction { // AuthActionImpersonate returns "system:auth.impersonate" action // // This function is auto-generated. +// func AuthActionImpersonate(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -526,6 +549,7 @@ func AuthActionImpersonate(props ...*authActionProps) *authAction { // AuthActionTotpConfigure returns "system:auth.totpConfigure" action // // This function is auto-generated. +// func AuthActionTotpConfigure(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -545,6 +569,7 @@ func AuthActionTotpConfigure(props ...*authActionProps) *authAction { // AuthActionTotpRemove returns "system:auth.totpRemove" action // // This function is auto-generated. +// func AuthActionTotpRemove(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -564,6 +589,7 @@ func AuthActionTotpRemove(props ...*authActionProps) *authAction { // AuthActionTotpValidate returns "system:auth.totpValidate" action // // This function is auto-generated. +// func AuthActionTotpValidate(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -583,6 +609,7 @@ func AuthActionTotpValidate(props ...*authActionProps) *authAction { // AuthActionEmailOtpVerify returns "system:auth.emailOtpVerify" action // // This function is auto-generated. +// func AuthActionEmailOtpVerify(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -602,6 +629,7 @@ func AuthActionEmailOtpVerify(props ...*authActionProps) *authAction { // AuthActionAccessTokensRemoved returns "system:auth.accessTokensRemoved" action // // This function is auto-generated. +// func AuthActionAccessTokensRemoved(props ...*authActionProps) *authAction { a := &authAction{ timestamp: time.Now(), @@ -624,7 +652,9 @@ func AuthActionAccessTokensRemoved(props ...*authActionProps) *authAction { // AuthErrGeneric returns "system:auth.generic" as *errors.Error // +// // This function is auto-generated. +// func AuthErrGeneric(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -658,7 +688,9 @@ func AuthErrGeneric(mm ...*authActionProps) *errors.Error { // AuthErrInvalidCredentials returns "system:auth.invalidCredentials" as *errors.Error // +// // This function is auto-generated. +// func AuthErrInvalidCredentials(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -692,7 +724,9 @@ func AuthErrInvalidCredentials(mm ...*authActionProps) *errors.Error { // AuthErrInvalidEmailFormat returns "system:auth.invalidEmailFormat" as *errors.Error // +// // This function is auto-generated. +// func AuthErrInvalidEmailFormat(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -724,7 +758,9 @@ func AuthErrInvalidEmailFormat(mm ...*authActionProps) *errors.Error { // AuthErrInvalidHandle returns "system:auth.invalidHandle" as *errors.Error // +// // This function is auto-generated. +// func AuthErrInvalidHandle(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -759,6 +795,7 @@ func AuthErrInvalidHandle(mm ...*authActionProps) *errors.Error { // Note: This error will be wrapped with safe (system:auth.invalidCredentials) error! // // This function is auto-generated. +// func AuthErrFailedForUnknownUser(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -798,6 +835,7 @@ func AuthErrFailedForUnknownUser(mm ...*authActionProps) *errors.Error { // Note: This error will be wrapped with safe (system:auth.invalidCredentials) error! // // This function is auto-generated. +// func AuthErrFailedForDeletedUser(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -837,6 +875,7 @@ func AuthErrFailedForDeletedUser(mm ...*authActionProps) *errors.Error { // Note: This error will be wrapped with safe (system:auth.invalidCredentials) error! // // This function is auto-generated. +// func AuthErrFailedForSuspendedUser(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -876,6 +915,7 @@ func AuthErrFailedForSuspendedUser(mm ...*authActionProps) *errors.Error { // Note: This error will be wrapped with safe (system:auth.invalidCredentials) error! // // This function is auto-generated. +// func AuthErrFailedForSystemUser(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -912,7 +952,9 @@ func AuthErrFailedForSystemUser(mm ...*authActionProps) *errors.Error { // AuthErrFailedUnconfirmedEmail returns "system:auth.failedUnconfirmedEmail" as *errors.Error // +// // This function is auto-generated. +// func AuthErrFailedUnconfirmedEmail(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -946,7 +988,9 @@ func AuthErrFailedUnconfirmedEmail(mm ...*authActionProps) *errors.Error { // AuthErrInternalLoginDisabledByConfig returns "system:auth.internalLoginDisabledByConfig" as *errors.Error // +// // This function is auto-generated. +// func AuthErrInternalLoginDisabledByConfig(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -978,7 +1022,9 @@ func AuthErrInternalLoginDisabledByConfig(mm ...*authActionProps) *errors.Error // AuthErrInternalSignupDisabledByConfig returns "system:auth.internalSignupDisabledByConfig" as *errors.Error // +// // This function is auto-generated. +// func AuthErrInternalSignupDisabledByConfig(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1010,7 +1056,9 @@ func AuthErrInternalSignupDisabledByConfig(mm ...*authActionProps) *errors.Error // AuthErrPasswordChangeFailedForUnknownUser returns "system:auth.passwordChangeFailedForUnknownUser" as *errors.Error // +// // This function is auto-generated. +// func AuthErrPasswordChangeFailedForUnknownUser(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1042,7 +1090,9 @@ func AuthErrPasswordChangeFailedForUnknownUser(mm ...*authActionProps) *errors.E // AuthErrPasswordResetFailedOldPasswordCheckFailed returns "system:auth.passwordResetFailedOldPasswordCheckFailed" as *errors.Error // +// // This function is auto-generated. +// func AuthErrPasswordResetFailedOldPasswordCheckFailed(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1074,7 +1124,9 @@ func AuthErrPasswordResetFailedOldPasswordCheckFailed(mm ...*authActionProps) *e // AuthErrPasswordSetFailedReusedPasswordCheckFailed returns "system:auth.passwordSetFailedReusedPasswordCheckFailed" as *errors.Error // +// // This function is auto-generated. +// func AuthErrPasswordSetFailedReusedPasswordCheckFailed(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1106,7 +1158,9 @@ func AuthErrPasswordSetFailedReusedPasswordCheckFailed(mm ...*authActionProps) * // AuthErrPasswordCreateFailedForUnknownUser returns "system:auth.passwordCreateFailedForUnknownUser" as *errors.Error // +// // This function is auto-generated. +// func AuthErrPasswordCreateFailedForUnknownUser(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1138,7 +1192,9 @@ func AuthErrPasswordCreateFailedForUnknownUser(mm ...*authActionProps) *errors.E // AuthErrPasswordResetDisabledByConfig returns "system:auth.passwordResetDisabledByConfig" as *errors.Error // +// // This function is auto-generated. +// func AuthErrPasswordResetDisabledByConfig(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1170,7 +1226,9 @@ func AuthErrPasswordResetDisabledByConfig(mm ...*authActionProps) *errors.Error // AuthErrPasswordCreateDisabledByConfig returns "system:auth.passwordCreateDisabledByConfig" as *errors.Error // +// // This function is auto-generated. +// func AuthErrPasswordCreateDisabledByConfig(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1202,7 +1260,9 @@ func AuthErrPasswordCreateDisabledByConfig(mm ...*authActionProps) *errors.Error // AuthErrPasswordNotSecure returns "system:auth.passwordNotSecure" as *errors.Error // +// // This function is auto-generated. +// func AuthErrPasswordNotSecure(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1234,7 +1294,9 @@ func AuthErrPasswordNotSecure(mm ...*authActionProps) *errors.Error { // AuthErrExternalDisabledByConfig returns "system:auth.externalDisabledByConfig" as *errors.Error // +// // This function is auto-generated. +// func AuthErrExternalDisabledByConfig(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1268,7 +1330,9 @@ func AuthErrExternalDisabledByConfig(mm ...*authActionProps) *errors.Error { // AuthErrProfileWithoutValidEmail returns "system:auth.profileWithoutValidEmail" as *errors.Error // +// // This function is auto-generated. +// func AuthErrProfileWithoutValidEmail(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1302,7 +1366,9 @@ func AuthErrProfileWithoutValidEmail(mm ...*authActionProps) *errors.Error { // AuthErrCredentialsLinkedToInvalidUser returns "system:auth.credentialsLinkedToInvalidUser" as *errors.Error // +// // This function is auto-generated. +// func AuthErrCredentialsLinkedToInvalidUser(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1334,7 +1400,9 @@ func AuthErrCredentialsLinkedToInvalidUser(mm ...*authActionProps) *errors.Error // AuthErrInvalidToken returns "system:auth.invalidToken" as *errors.Error // +// // This function is auto-generated. +// func AuthErrInvalidToken(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1366,7 +1434,9 @@ func AuthErrInvalidToken(mm ...*authActionProps) *errors.Error { // AuthErrNotAllowedToImpersonate returns "system:auth.notAllowedToImpersonate" as *errors.Error // +// // This function is auto-generated. +// func AuthErrNotAllowedToImpersonate(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1398,7 +1468,9 @@ func AuthErrNotAllowedToImpersonate(mm ...*authActionProps) *errors.Error { // AuthErrNotAllowedToRemoveTOTP returns "system:auth.notAllowedToRemoveTOTP" as *errors.Error // +// // This function is auto-generated. +// func AuthErrNotAllowedToRemoveTOTP(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1430,7 +1502,9 @@ func AuthErrNotAllowedToRemoveTOTP(mm ...*authActionProps) *errors.Error { // AuthErrUnconfiguredTOTP returns "system:auth.unconfiguredTOTP" as *errors.Error // +// // This function is auto-generated. +// func AuthErrUnconfiguredTOTP(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1462,7 +1536,9 @@ func AuthErrUnconfiguredTOTP(mm ...*authActionProps) *errors.Error { // AuthErrNotAllowedToConfigureTOTP returns "system:auth.notAllowedToConfigureTOTP" as *errors.Error // +// // This function is auto-generated. +// func AuthErrNotAllowedToConfigureTOTP(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1494,7 +1570,9 @@ func AuthErrNotAllowedToConfigureTOTP(mm ...*authActionProps) *errors.Error { // AuthErrEnforcedMFAWithTOTP returns "system:auth.enforcedMFAWithTOTP" as *errors.Error // +// // This function is auto-generated. +// func AuthErrEnforcedMFAWithTOTP(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1526,7 +1604,9 @@ func AuthErrEnforcedMFAWithTOTP(mm ...*authActionProps) *errors.Error { // AuthErrInvalidTOTP returns "system:auth.invalidTOTP" as *errors.Error // +// // This function is auto-generated. +// func AuthErrInvalidTOTP(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1558,7 +1638,9 @@ func AuthErrInvalidTOTP(mm ...*authActionProps) *errors.Error { // AuthErrDisabledMFAWithTOTP returns "system:auth.disabledMFAWithTOTP" as *errors.Error // +// // This function is auto-generated. +// func AuthErrDisabledMFAWithTOTP(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1590,7 +1672,9 @@ func AuthErrDisabledMFAWithTOTP(mm ...*authActionProps) *errors.Error { // AuthErrDisabledMFAWithEmailOTP returns "system:auth.disabledMFAWithEmailOTP" as *errors.Error // +// // This function is auto-generated. +// func AuthErrDisabledMFAWithEmailOTP(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1622,7 +1706,9 @@ func AuthErrDisabledMFAWithEmailOTP(mm ...*authActionProps) *errors.Error { // AuthErrEnforcedMFAWithEmailOTP returns "system:auth.enforcedMFAWithEmailOTP" as *errors.Error // +// // This function is auto-generated. +// func AuthErrEnforcedMFAWithEmailOTP(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1654,7 +1740,9 @@ func AuthErrEnforcedMFAWithEmailOTP(mm ...*authActionProps) *errors.Error { // AuthErrInvalidEmailOTP returns "system:auth.invalidEmailOTP" as *errors.Error // +// // This function is auto-generated. +// func AuthErrInvalidEmailOTP(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1686,7 +1774,9 @@ func AuthErrInvalidEmailOTP(mm ...*authActionProps) *errors.Error { // AuthErrRateLimitExceeded returns "system:auth.rateLimitExceeded" as *errors.Error // +// // This function is auto-generated. +// func AuthErrRateLimitExceeded(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1720,7 +1810,9 @@ func AuthErrRateLimitExceeded(mm ...*authActionProps) *errors.Error { // AuthErrMaxUserLimitReached returns "system:auth.maxUserLimitReached" as *errors.Error // +// // This function is auto-generated. +// func AuthErrMaxUserLimitReached(mm ...*authActionProps) *errors.Error { var p = &authActionProps{} if len(mm) > 0 { @@ -1758,6 +1850,7 @@ func AuthErrMaxUserLimitReached(mm ...*authActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc auth) recordAction(ctx context.Context, props *authActionProps, actionFn func(...*authActionProps) *authAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/auth_client_actions.gen.go b/server/system/service/auth_client_actions.gen.go index 7c05b2daf..f0c27ef19 100644 --- a/server/system/service/auth_client_actions.gen.go +++ b/server/system/service/auth_client_actions.gen.go @@ -55,6 +55,7 @@ var ( // setAuthClient updates authClientActionProps's authClient // // This function is auto-generated. +// func (p *authClientActionProps) setAuthClient(authClient *types.AuthClient) *authClientActionProps { p.authClient = authClient return p @@ -63,6 +64,7 @@ func (p *authClientActionProps) setAuthClient(authClient *types.AuthClient) *aut // setNew updates authClientActionProps's new // // This function is auto-generated. +// func (p *authClientActionProps) setNew(new *types.AuthClient) *authClientActionProps { p.new = new return p @@ -71,6 +73,7 @@ func (p *authClientActionProps) setNew(new *types.AuthClient) *authClientActionP // setUpdate updates authClientActionProps's update // // This function is auto-generated. +// func (p *authClientActionProps) setUpdate(update *types.AuthClient) *authClientActionProps { p.update = update return p @@ -79,6 +82,7 @@ func (p *authClientActionProps) setUpdate(update *types.AuthClient) *authClientA // setFilter updates authClientActionProps's filter // // This function is auto-generated. +// func (p *authClientActionProps) setFilter(filter *types.AuthClientFilter) *authClientActionProps { p.filter = filter return p @@ -87,6 +91,7 @@ func (p *authClientActionProps) setFilter(filter *types.AuthClientFilter) *authC // Serialize converts authClientActionProps to actionlog.Meta // // This function is auto-generated. +// func (p authClientActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -116,6 +121,7 @@ func (p authClientActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p authClientActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -204,6 +210,7 @@ func (p authClientActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *authClientAction) String() string { var props = &authClientActionProps{} @@ -231,6 +238,7 @@ func (e *authClientAction) ToAction() *actionlog.Action { // AuthClientActionSearch returns "system:auth-client.search" action // // This function is auto-generated. +// func AuthClientActionSearch(props ...*authClientActionProps) *authClientAction { a := &authClientAction{ timestamp: time.Now(), @@ -250,6 +258,7 @@ func AuthClientActionSearch(props ...*authClientActionProps) *authClientAction { // AuthClientActionLookup returns "system:auth-client.lookup" action // // This function is auto-generated. +// func AuthClientActionLookup(props ...*authClientActionProps) *authClientAction { a := &authClientAction{ timestamp: time.Now(), @@ -269,6 +278,7 @@ func AuthClientActionLookup(props ...*authClientActionProps) *authClientAction { // AuthClientActionCreate returns "system:auth-client.create" action // // This function is auto-generated. +// func AuthClientActionCreate(props ...*authClientActionProps) *authClientAction { a := &authClientAction{ timestamp: time.Now(), @@ -288,6 +298,7 @@ func AuthClientActionCreate(props ...*authClientActionProps) *authClientAction { // AuthClientActionUpdate returns "system:auth-client.update" action // // This function is auto-generated. +// func AuthClientActionUpdate(props ...*authClientActionProps) *authClientAction { a := &authClientAction{ timestamp: time.Now(), @@ -307,6 +318,7 @@ func AuthClientActionUpdate(props ...*authClientActionProps) *authClientAction { // AuthClientActionDelete returns "system:auth-client.delete" action // // This function is auto-generated. +// func AuthClientActionDelete(props ...*authClientActionProps) *authClientAction { a := &authClientAction{ timestamp: time.Now(), @@ -326,6 +338,7 @@ func AuthClientActionDelete(props ...*authClientActionProps) *authClientAction { // AuthClientActionUndelete returns "system:auth-client.undelete" action // // This function is auto-generated. +// func AuthClientActionUndelete(props ...*authClientActionProps) *authClientAction { a := &authClientAction{ timestamp: time.Now(), @@ -345,6 +358,7 @@ func AuthClientActionUndelete(props ...*authClientActionProps) *authClientAction // AuthClientActionExposeSecret returns "system:auth-client.exposeSecret" action // // This function is auto-generated. +// func AuthClientActionExposeSecret(props ...*authClientActionProps) *authClientAction { a := &authClientAction{ timestamp: time.Now(), @@ -364,6 +378,7 @@ func AuthClientActionExposeSecret(props ...*authClientActionProps) *authClientAc // AuthClientActionRegenerateSecret returns "system:auth-client.regenerateSecret" action // // This function is auto-generated. +// func AuthClientActionRegenerateSecret(props ...*authClientActionProps) *authClientAction { a := &authClientAction{ timestamp: time.Now(), @@ -386,7 +401,9 @@ func AuthClientActionRegenerateSecret(props ...*authClientActionProps) *authClie // AuthClientErrGeneric returns "system:auth-client.generic" as *errors.Error // +// // This function is auto-generated. +// func AuthClientErrGeneric(mm ...*authClientActionProps) *errors.Error { var p = &authClientActionProps{} if len(mm) > 0 { @@ -420,7 +437,9 @@ func AuthClientErrGeneric(mm ...*authClientActionProps) *errors.Error { // AuthClientErrNotFound returns "system:auth-client.notFound" as *errors.Error // +// // This function is auto-generated. +// func AuthClientErrNotFound(mm ...*authClientActionProps) *errors.Error { var p = &authClientActionProps{} if len(mm) > 0 { @@ -452,7 +471,9 @@ func AuthClientErrNotFound(mm ...*authClientActionProps) *errors.Error { // AuthClientErrInvalidID returns "system:auth-client.invalidID" as *errors.Error // +// // This function is auto-generated. +// func AuthClientErrInvalidID(mm ...*authClientActionProps) *errors.Error { var p = &authClientActionProps{} if len(mm) > 0 { @@ -484,7 +505,9 @@ func AuthClientErrInvalidID(mm ...*authClientActionProps) *errors.Error { // AuthClientErrMissingName returns "system:auth-client.missingName" as *errors.Error // +// // This function is auto-generated. +// func AuthClientErrMissingName(mm ...*authClientActionProps) *errors.Error { var p = &authClientActionProps{} if len(mm) > 0 { @@ -516,7 +539,9 @@ func AuthClientErrMissingName(mm ...*authClientActionProps) *errors.Error { // AuthClientErrUnknownGrantType returns "system:auth-client.unknownGrantType" as *errors.Error // +// // This function is auto-generated. +// func AuthClientErrUnknownGrantType(mm ...*authClientActionProps) *errors.Error { var p = &authClientActionProps{} if len(mm) > 0 { @@ -548,7 +573,9 @@ func AuthClientErrUnknownGrantType(mm ...*authClientActionProps) *errors.Error { // AuthClientErrUnknownScope returns "system:auth-client.unknownScope" as *errors.Error // +// // This function is auto-generated. +// func AuthClientErrUnknownScope(mm ...*authClientActionProps) *errors.Error { var p = &authClientActionProps{} if len(mm) > 0 { @@ -580,7 +607,9 @@ func AuthClientErrUnknownScope(mm ...*authClientActionProps) *errors.Error { // AuthClientErrUnableToChangeDefaultClientHandle returns "system:auth-client.unableToChangeDefaultClientHandle" as *errors.Error // +// // This function is auto-generated. +// func AuthClientErrUnableToChangeDefaultClientHandle(mm ...*authClientActionProps) *errors.Error { var p = &authClientActionProps{} if len(mm) > 0 { @@ -614,7 +643,9 @@ func AuthClientErrUnableToChangeDefaultClientHandle(mm ...*authClientActionProps // AuthClientErrUnableToDisableDefaultClient returns "system:auth-client.unableToDisableDefaultClient" as *errors.Error // +// // This function is auto-generated. +// func AuthClientErrUnableToDisableDefaultClient(mm ...*authClientActionProps) *errors.Error { var p = &authClientActionProps{} if len(mm) > 0 { @@ -648,7 +679,9 @@ func AuthClientErrUnableToDisableDefaultClient(mm ...*authClientActionProps) *er // AuthClientErrUnableToDeleteDefaultClient returns "system:auth-client.unableToDeleteDefaultClient" as *errors.Error // +// // This function is auto-generated. +// func AuthClientErrUnableToDeleteDefaultClient(mm ...*authClientActionProps) *errors.Error { var p = &authClientActionProps{} if len(mm) > 0 { @@ -682,7 +715,9 @@ func AuthClientErrUnableToDeleteDefaultClient(mm ...*authClientActionProps) *err // AuthClientErrNotAllowedToRead returns "system:auth-client.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func AuthClientErrNotAllowedToRead(mm ...*authClientActionProps) *errors.Error { var p = &authClientActionProps{} if len(mm) > 0 { @@ -716,7 +751,9 @@ func AuthClientErrNotAllowedToRead(mm ...*authClientActionProps) *errors.Error { // AuthClientErrNotAllowedToSearch returns "system:auth-client.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func AuthClientErrNotAllowedToSearch(mm ...*authClientActionProps) *errors.Error { var p = &authClientActionProps{} if len(mm) > 0 { @@ -750,7 +787,9 @@ func AuthClientErrNotAllowedToSearch(mm ...*authClientActionProps) *errors.Error // AuthClientErrNotAllowedToCreate returns "system:auth-client.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func AuthClientErrNotAllowedToCreate(mm ...*authClientActionProps) *errors.Error { var p = &authClientActionProps{} if len(mm) > 0 { @@ -784,7 +823,9 @@ func AuthClientErrNotAllowedToCreate(mm ...*authClientActionProps) *errors.Error // AuthClientErrNotAllowedToUpdate returns "system:auth-client.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func AuthClientErrNotAllowedToUpdate(mm ...*authClientActionProps) *errors.Error { var p = &authClientActionProps{} if len(mm) > 0 { @@ -818,7 +859,9 @@ func AuthClientErrNotAllowedToUpdate(mm ...*authClientActionProps) *errors.Error // AuthClientErrNotAllowedToDelete returns "system:auth-client.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func AuthClientErrNotAllowedToDelete(mm ...*authClientActionProps) *errors.Error { var p = &authClientActionProps{} if len(mm) > 0 { @@ -852,7 +895,9 @@ func AuthClientErrNotAllowedToDelete(mm ...*authClientActionProps) *errors.Error // AuthClientErrNotAllowedToUndelete returns "system:auth-client.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func AuthClientErrNotAllowedToUndelete(mm ...*authClientActionProps) *errors.Error { var p = &authClientActionProps{} if len(mm) > 0 { @@ -892,6 +937,7 @@ func AuthClientErrNotAllowedToUndelete(mm ...*authClientActionProps) *errors.Err // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc authClient) recordAction(ctx context.Context, props *authClientActionProps, actionFn func(...*authClientActionProps) *authClientAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/credentials_actions.gen.go b/server/system/service/credentials_actions.gen.go index 5ac9a9738..bd1d167be 100644 --- a/server/system/service/credentials_actions.gen.go +++ b/server/system/service/credentials_actions.gen.go @@ -53,6 +53,7 @@ var ( // setUser updates credentialsActionProps's user // // This function is auto-generated. +// func (p *credentialsActionProps) setUser(user *types.User) *credentialsActionProps { p.user = user return p @@ -61,6 +62,7 @@ func (p *credentialsActionProps) setUser(user *types.User) *credentialsActionPro // setCredentials updates credentialsActionProps's credentials // // This function is auto-generated. +// func (p *credentialsActionProps) setCredentials(credentials *types.Credential) *credentialsActionProps { p.credentials = credentials return p @@ -69,6 +71,7 @@ func (p *credentialsActionProps) setCredentials(credentials *types.Credential) * // Serialize converts credentialsActionProps to actionlog.Meta // // This function is auto-generated. +// func (p credentialsActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -91,6 +94,7 @@ func (p credentialsActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p credentialsActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -153,6 +157,7 @@ func (p credentialsActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *credentialsAction) String() string { var props = &credentialsActionProps{} @@ -180,6 +185,7 @@ func (e *credentialsAction) ToAction() *actionlog.Action { // CredentialsActionSearch returns "system:credentials.search" action // // This function is auto-generated. +// func CredentialsActionSearch(props ...*credentialsActionProps) *credentialsAction { a := &credentialsAction{ timestamp: time.Now(), @@ -199,6 +205,7 @@ func CredentialsActionSearch(props ...*credentialsActionProps) *credentialsActio // CredentialsActionDelete returns "system:credentials.delete" action // // This function is auto-generated. +// func CredentialsActionDelete(props ...*credentialsActionProps) *credentialsAction { a := &credentialsAction{ timestamp: time.Now(), @@ -218,6 +225,7 @@ func CredentialsActionDelete(props ...*credentialsActionProps) *credentialsActio // CredentialsActionCreate returns "system:credentials.create" action // // This function is auto-generated. +// func CredentialsActionCreate(props ...*credentialsActionProps) *credentialsAction { a := &credentialsAction{ timestamp: time.Now(), @@ -237,6 +245,7 @@ func CredentialsActionCreate(props ...*credentialsActionProps) *credentialsActio // CredentialsActionUpdate returns "system:credentials.update" action // // This function is auto-generated. +// func CredentialsActionUpdate(props ...*credentialsActionProps) *credentialsAction { a := &credentialsAction{ timestamp: time.Now(), @@ -259,7 +268,9 @@ func CredentialsActionUpdate(props ...*credentialsActionProps) *credentialsActio // CredentialsErrGeneric returns "system:credentials.generic" as *errors.Error // +// // This function is auto-generated. +// func CredentialsErrGeneric(mm ...*credentialsActionProps) *errors.Error { var p = &credentialsActionProps{} if len(mm) > 0 { @@ -293,7 +304,9 @@ func CredentialsErrGeneric(mm ...*credentialsActionProps) *errors.Error { // CredentialsErrNotFound returns "system:credentials.notFound" as *errors.Error // +// // This function is auto-generated. +// func CredentialsErrNotFound(mm ...*credentialsActionProps) *errors.Error { var p = &credentialsActionProps{} if len(mm) > 0 { @@ -325,7 +338,9 @@ func CredentialsErrNotFound(mm ...*credentialsActionProps) *errors.Error { // CredentialsErrInvalidID returns "system:credentials.invalidID" as *errors.Error // +// // This function is auto-generated. +// func CredentialsErrInvalidID(mm ...*credentialsActionProps) *errors.Error { var p = &credentialsActionProps{} if len(mm) > 0 { @@ -357,7 +372,9 @@ func CredentialsErrInvalidID(mm ...*credentialsActionProps) *errors.Error { // CredentialsErrNotAllowedToManage returns "system:credentials.notAllowedToManage" as *errors.Error // +// // This function is auto-generated. +// func CredentialsErrNotAllowedToManage(mm ...*credentialsActionProps) *errors.Error { var p = &credentialsActionProps{} if len(mm) > 0 { @@ -397,6 +414,7 @@ func CredentialsErrNotAllowedToManage(mm ...*credentialsActionProps) *errors.Err // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc credentials) recordAction(ctx context.Context, props *credentialsActionProps, actionFn func(...*credentialsActionProps) *credentialsAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/dal_connection_actions.gen.go b/server/system/service/dal_connection_actions.gen.go index fadf3f829..ce87cdd9d 100644 --- a/server/system/service/dal_connection_actions.gen.go +++ b/server/system/service/dal_connection_actions.gen.go @@ -55,6 +55,7 @@ var ( // setConnection updates dalConnectionActionProps's connection // // This function is auto-generated. +// func (p *dalConnectionActionProps) setConnection(connection *types.DalConnection) *dalConnectionActionProps { p.connection = connection return p @@ -63,6 +64,7 @@ func (p *dalConnectionActionProps) setConnection(connection *types.DalConnection // setNew updates dalConnectionActionProps's new // // This function is auto-generated. +// func (p *dalConnectionActionProps) setNew(new *types.DalConnection) *dalConnectionActionProps { p.new = new return p @@ -71,6 +73,7 @@ func (p *dalConnectionActionProps) setNew(new *types.DalConnection) *dalConnecti // setUpdate updates dalConnectionActionProps's update // // This function is auto-generated. +// func (p *dalConnectionActionProps) setUpdate(update *types.DalConnection) *dalConnectionActionProps { p.update = update return p @@ -79,6 +82,7 @@ func (p *dalConnectionActionProps) setUpdate(update *types.DalConnection) *dalCo // setSearch updates dalConnectionActionProps's search // // This function is auto-generated. +// func (p *dalConnectionActionProps) setSearch(search *types.DalConnectionFilter) *dalConnectionActionProps { p.search = search return p @@ -87,6 +91,7 @@ func (p *dalConnectionActionProps) setSearch(search *types.DalConnectionFilter) // Serialize converts dalConnectionActionProps to actionlog.Meta // // This function is auto-generated. +// func (p dalConnectionActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -113,6 +118,7 @@ func (p dalConnectionActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p dalConnectionActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -194,6 +200,7 @@ func (p dalConnectionActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *dalConnectionAction) String() string { var props = &dalConnectionActionProps{} @@ -221,6 +228,7 @@ func (e *dalConnectionAction) ToAction() *actionlog.Action { // DalConnectionActionSearch returns "system:dal-connection.search" action // // This function is auto-generated. +// func DalConnectionActionSearch(props ...*dalConnectionActionProps) *dalConnectionAction { a := &dalConnectionAction{ timestamp: time.Now(), @@ -240,6 +248,7 @@ func DalConnectionActionSearch(props ...*dalConnectionActionProps) *dalConnectio // DalConnectionActionLookup returns "system:dal-connection.lookup" action // // This function is auto-generated. +// func DalConnectionActionLookup(props ...*dalConnectionActionProps) *dalConnectionAction { a := &dalConnectionAction{ timestamp: time.Now(), @@ -259,6 +268,7 @@ func DalConnectionActionLookup(props ...*dalConnectionActionProps) *dalConnectio // DalConnectionActionCreate returns "system:dal-connection.create" action // // This function is auto-generated. +// func DalConnectionActionCreate(props ...*dalConnectionActionProps) *dalConnectionAction { a := &dalConnectionAction{ timestamp: time.Now(), @@ -278,6 +288,7 @@ func DalConnectionActionCreate(props ...*dalConnectionActionProps) *dalConnectio // DalConnectionActionUpdate returns "system:dal-connection.update" action // // This function is auto-generated. +// func DalConnectionActionUpdate(props ...*dalConnectionActionProps) *dalConnectionAction { a := &dalConnectionAction{ timestamp: time.Now(), @@ -297,6 +308,7 @@ func DalConnectionActionUpdate(props ...*dalConnectionActionProps) *dalConnectio // DalConnectionActionDelete returns "system:dal-connection.delete" action // // This function is auto-generated. +// func DalConnectionActionDelete(props ...*dalConnectionActionProps) *dalConnectionAction { a := &dalConnectionAction{ timestamp: time.Now(), @@ -316,6 +328,7 @@ func DalConnectionActionDelete(props ...*dalConnectionActionProps) *dalConnectio // DalConnectionActionUndelete returns "system:dal-connection.undelete" action // // This function is auto-generated. +// func DalConnectionActionUndelete(props ...*dalConnectionActionProps) *dalConnectionAction { a := &dalConnectionAction{ timestamp: time.Now(), @@ -338,7 +351,9 @@ func DalConnectionActionUndelete(props ...*dalConnectionActionProps) *dalConnect // DalConnectionErrGeneric returns "system:dal-connection.generic" as *errors.Error // +// // This function is auto-generated. +// func DalConnectionErrGeneric(mm ...*dalConnectionActionProps) *errors.Error { var p = &dalConnectionActionProps{} if len(mm) > 0 { @@ -372,7 +387,9 @@ func DalConnectionErrGeneric(mm ...*dalConnectionActionProps) *errors.Error { // DalConnectionErrNotFound returns "system:dal-connection.notFound" as *errors.Error // +// // This function is auto-generated. +// func DalConnectionErrNotFound(mm ...*dalConnectionActionProps) *errors.Error { var p = &dalConnectionActionProps{} if len(mm) > 0 { @@ -404,7 +421,9 @@ func DalConnectionErrNotFound(mm ...*dalConnectionActionProps) *errors.Error { // DalConnectionErrInvalidID returns "system:dal-connection.invalidID" as *errors.Error // +// // This function is auto-generated. +// func DalConnectionErrInvalidID(mm ...*dalConnectionActionProps) *errors.Error { var p = &dalConnectionActionProps{} if len(mm) > 0 { @@ -436,7 +455,9 @@ func DalConnectionErrInvalidID(mm ...*dalConnectionActionProps) *errors.Error { // DalConnectionErrMissingName returns "system:dal-connection.missingName" as *errors.Error // +// // This function is auto-generated. +// func DalConnectionErrMissingName(mm ...*dalConnectionActionProps) *errors.Error { var p = &dalConnectionActionProps{} if len(mm) > 0 { @@ -468,7 +489,9 @@ func DalConnectionErrMissingName(mm ...*dalConnectionActionProps) *errors.Error // DalConnectionErrInvalidEndpoint returns "system:dal-connection.invalidEndpoint" as *errors.Error // +// // This function is auto-generated. +// func DalConnectionErrInvalidEndpoint(mm ...*dalConnectionActionProps) *errors.Error { var p = &dalConnectionActionProps{} if len(mm) > 0 { @@ -500,7 +523,9 @@ func DalConnectionErrInvalidEndpoint(mm ...*dalConnectionActionProps) *errors.Er // DalConnectionErrExistsEndpoint returns "system:dal-connection.existsEndpoint" as *errors.Error // +// // This function is auto-generated. +// func DalConnectionErrExistsEndpoint(mm ...*dalConnectionActionProps) *errors.Error { var p = &dalConnectionActionProps{} if len(mm) > 0 { @@ -532,7 +557,9 @@ func DalConnectionErrExistsEndpoint(mm ...*dalConnectionActionProps) *errors.Err // DalConnectionErrAlreadyExists returns "system:dal-connection.alreadyExists" as *errors.Error // +// // This function is auto-generated. +// func DalConnectionErrAlreadyExists(mm ...*dalConnectionActionProps) *errors.Error { var p = &dalConnectionActionProps{} if len(mm) > 0 { @@ -564,7 +591,9 @@ func DalConnectionErrAlreadyExists(mm ...*dalConnectionActionProps) *errors.Erro // DalConnectionErrNotAllowedToCreate returns "system:dal-connection.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func DalConnectionErrNotAllowedToCreate(mm ...*dalConnectionActionProps) *errors.Error { var p = &dalConnectionActionProps{} if len(mm) > 0 { @@ -598,7 +627,9 @@ func DalConnectionErrNotAllowedToCreate(mm ...*dalConnectionActionProps) *errors // DalConnectionErrNotAllowedToRead returns "system:dal-connection.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func DalConnectionErrNotAllowedToRead(mm ...*dalConnectionActionProps) *errors.Error { var p = &dalConnectionActionProps{} if len(mm) > 0 { @@ -632,7 +663,9 @@ func DalConnectionErrNotAllowedToRead(mm ...*dalConnectionActionProps) *errors.E // DalConnectionErrNotAllowedToSearch returns "system:dal-connection.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func DalConnectionErrNotAllowedToSearch(mm ...*dalConnectionActionProps) *errors.Error { var p = &dalConnectionActionProps{} if len(mm) > 0 { @@ -666,7 +699,9 @@ func DalConnectionErrNotAllowedToSearch(mm ...*dalConnectionActionProps) *errors // DalConnectionErrNotAllowedToUpdate returns "system:dal-connection.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func DalConnectionErrNotAllowedToUpdate(mm ...*dalConnectionActionProps) *errors.Error { var p = &dalConnectionActionProps{} if len(mm) > 0 { @@ -700,7 +735,9 @@ func DalConnectionErrNotAllowedToUpdate(mm ...*dalConnectionActionProps) *errors // DalConnectionErrNotAllowedToDelete returns "system:dal-connection.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func DalConnectionErrNotAllowedToDelete(mm ...*dalConnectionActionProps) *errors.Error { var p = &dalConnectionActionProps{} if len(mm) > 0 { @@ -734,7 +771,9 @@ func DalConnectionErrNotAllowedToDelete(mm ...*dalConnectionActionProps) *errors // DalConnectionErrNotAllowedToUndelete returns "system:dal-connection.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func DalConnectionErrNotAllowedToUndelete(mm ...*dalConnectionActionProps) *errors.Error { var p = &dalConnectionActionProps{} if len(mm) > 0 { @@ -768,7 +807,9 @@ func DalConnectionErrNotAllowedToUndelete(mm ...*dalConnectionActionProps) *erro // DalConnectionErrNotAllowedToExec returns "system:dal-connection.notAllowedToExec" as *errors.Error // +// // This function is auto-generated. +// func DalConnectionErrNotAllowedToExec(mm ...*dalConnectionActionProps) *errors.Error { var p = &dalConnectionActionProps{} if len(mm) > 0 { @@ -808,6 +849,7 @@ func DalConnectionErrNotAllowedToExec(mm ...*dalConnectionActionProps) *errors.E // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc dalConnection) recordAction(ctx context.Context, props *dalConnectionActionProps, actionFn func(...*dalConnectionActionProps) *dalConnectionAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/dal_sensitivity_level_actions.gen.go b/server/system/service/dal_sensitivity_level_actions.gen.go index dbfdb3f26..317443550 100644 --- a/server/system/service/dal_sensitivity_level_actions.gen.go +++ b/server/system/service/dal_sensitivity_level_actions.gen.go @@ -55,6 +55,7 @@ var ( // setSensitivityLevel updates dalSensitivityLevelActionProps's sensitivityLevel // // This function is auto-generated. +// func (p *dalSensitivityLevelActionProps) setSensitivityLevel(sensitivityLevel *types.DalSensitivityLevel) *dalSensitivityLevelActionProps { p.sensitivityLevel = sensitivityLevel return p @@ -63,6 +64,7 @@ func (p *dalSensitivityLevelActionProps) setSensitivityLevel(sensitivityLevel *t // setNew updates dalSensitivityLevelActionProps's new // // This function is auto-generated. +// func (p *dalSensitivityLevelActionProps) setNew(new *types.DalSensitivityLevel) *dalSensitivityLevelActionProps { p.new = new return p @@ -71,6 +73,7 @@ func (p *dalSensitivityLevelActionProps) setNew(new *types.DalSensitivityLevel) // setUpdate updates dalSensitivityLevelActionProps's update // // This function is auto-generated. +// func (p *dalSensitivityLevelActionProps) setUpdate(update *types.DalSensitivityLevel) *dalSensitivityLevelActionProps { p.update = update return p @@ -79,6 +82,7 @@ func (p *dalSensitivityLevelActionProps) setUpdate(update *types.DalSensitivityL // setSearch updates dalSensitivityLevelActionProps's search // // This function is auto-generated. +// func (p *dalSensitivityLevelActionProps) setSearch(search *types.DalSensitivityLevelFilter) *dalSensitivityLevelActionProps { p.search = search return p @@ -87,6 +91,7 @@ func (p *dalSensitivityLevelActionProps) setSearch(search *types.DalSensitivityL // Serialize converts dalSensitivityLevelActionProps to actionlog.Meta // // This function is auto-generated. +// func (p dalSensitivityLevelActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -113,6 +118,7 @@ func (p dalSensitivityLevelActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p dalSensitivityLevelActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -194,6 +200,7 @@ func (p dalSensitivityLevelActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *dalSensitivityLevelAction) String() string { var props = &dalSensitivityLevelActionProps{} @@ -221,6 +228,7 @@ func (e *dalSensitivityLevelAction) ToAction() *actionlog.Action { // DalSensitivityLevelActionSearch returns "system:dal-sensitivity-level.search" action // // This function is auto-generated. +// func DalSensitivityLevelActionSearch(props ...*dalSensitivityLevelActionProps) *dalSensitivityLevelAction { a := &dalSensitivityLevelAction{ timestamp: time.Now(), @@ -240,6 +248,7 @@ func DalSensitivityLevelActionSearch(props ...*dalSensitivityLevelActionProps) * // DalSensitivityLevelActionLookup returns "system:dal-sensitivity-level.lookup" action // // This function is auto-generated. +// func DalSensitivityLevelActionLookup(props ...*dalSensitivityLevelActionProps) *dalSensitivityLevelAction { a := &dalSensitivityLevelAction{ timestamp: time.Now(), @@ -259,6 +268,7 @@ func DalSensitivityLevelActionLookup(props ...*dalSensitivityLevelActionProps) * // DalSensitivityLevelActionCreate returns "system:dal-sensitivity-level.create" action // // This function is auto-generated. +// func DalSensitivityLevelActionCreate(props ...*dalSensitivityLevelActionProps) *dalSensitivityLevelAction { a := &dalSensitivityLevelAction{ timestamp: time.Now(), @@ -278,6 +288,7 @@ func DalSensitivityLevelActionCreate(props ...*dalSensitivityLevelActionProps) * // DalSensitivityLevelActionUpdate returns "system:dal-sensitivity-level.update" action // // This function is auto-generated. +// func DalSensitivityLevelActionUpdate(props ...*dalSensitivityLevelActionProps) *dalSensitivityLevelAction { a := &dalSensitivityLevelAction{ timestamp: time.Now(), @@ -297,6 +308,7 @@ func DalSensitivityLevelActionUpdate(props ...*dalSensitivityLevelActionProps) * // DalSensitivityLevelActionDelete returns "system:dal-sensitivity-level.delete" action // // This function is auto-generated. +// func DalSensitivityLevelActionDelete(props ...*dalSensitivityLevelActionProps) *dalSensitivityLevelAction { a := &dalSensitivityLevelAction{ timestamp: time.Now(), @@ -316,6 +328,7 @@ func DalSensitivityLevelActionDelete(props ...*dalSensitivityLevelActionProps) * // DalSensitivityLevelActionUndelete returns "system:dal-sensitivity-level.undelete" action // // This function is auto-generated. +// func DalSensitivityLevelActionUndelete(props ...*dalSensitivityLevelActionProps) *dalSensitivityLevelAction { a := &dalSensitivityLevelAction{ timestamp: time.Now(), @@ -338,7 +351,9 @@ func DalSensitivityLevelActionUndelete(props ...*dalSensitivityLevelActionProps) // DalSensitivityLevelErrGeneric returns "system:dal-sensitivity-level.generic" as *errors.Error // +// // This function is auto-generated. +// func DalSensitivityLevelErrGeneric(mm ...*dalSensitivityLevelActionProps) *errors.Error { var p = &dalSensitivityLevelActionProps{} if len(mm) > 0 { @@ -372,7 +387,9 @@ func DalSensitivityLevelErrGeneric(mm ...*dalSensitivityLevelActionProps) *error // DalSensitivityLevelErrNotFound returns "system:dal-sensitivity-level.notFound" as *errors.Error // +// // This function is auto-generated. +// func DalSensitivityLevelErrNotFound(mm ...*dalSensitivityLevelActionProps) *errors.Error { var p = &dalSensitivityLevelActionProps{} if len(mm) > 0 { @@ -404,7 +421,9 @@ func DalSensitivityLevelErrNotFound(mm ...*dalSensitivityLevelActionProps) *erro // DalSensitivityLevelErrInvalidID returns "system:dal-sensitivity-level.invalidID" as *errors.Error // +// // This function is auto-generated. +// func DalSensitivityLevelErrInvalidID(mm ...*dalSensitivityLevelActionProps) *errors.Error { var p = &dalSensitivityLevelActionProps{} if len(mm) > 0 { @@ -436,7 +455,9 @@ func DalSensitivityLevelErrInvalidID(mm ...*dalSensitivityLevelActionProps) *err // DalSensitivityLevelErrMissingName returns "system:dal-sensitivity-level.missingName" as *errors.Error // +// // This function is auto-generated. +// func DalSensitivityLevelErrMissingName(mm ...*dalSensitivityLevelActionProps) *errors.Error { var p = &dalSensitivityLevelActionProps{} if len(mm) > 0 { @@ -468,7 +489,9 @@ func DalSensitivityLevelErrMissingName(mm ...*dalSensitivityLevelActionProps) *e // DalSensitivityLevelErrInvalidEndpoint returns "system:dal-sensitivity-level.invalidEndpoint" as *errors.Error // +// // This function is auto-generated. +// func DalSensitivityLevelErrInvalidEndpoint(mm ...*dalSensitivityLevelActionProps) *errors.Error { var p = &dalSensitivityLevelActionProps{} if len(mm) > 0 { @@ -500,7 +523,9 @@ func DalSensitivityLevelErrInvalidEndpoint(mm ...*dalSensitivityLevelActionProps // DalSensitivityLevelErrExistsEndpoint returns "system:dal-sensitivity-level.existsEndpoint" as *errors.Error // +// // This function is auto-generated. +// func DalSensitivityLevelErrExistsEndpoint(mm ...*dalSensitivityLevelActionProps) *errors.Error { var p = &dalSensitivityLevelActionProps{} if len(mm) > 0 { @@ -532,7 +557,9 @@ func DalSensitivityLevelErrExistsEndpoint(mm ...*dalSensitivityLevelActionProps) // DalSensitivityLevelErrAlreadyExists returns "system:dal-sensitivity-level.alreadyExists" as *errors.Error // +// // This function is auto-generated. +// func DalSensitivityLevelErrAlreadyExists(mm ...*dalSensitivityLevelActionProps) *errors.Error { var p = &dalSensitivityLevelActionProps{} if len(mm) > 0 { @@ -564,7 +591,9 @@ func DalSensitivityLevelErrAlreadyExists(mm ...*dalSensitivityLevelActionProps) // DalSensitivityLevelErrDeleteInUse returns "system:dal-sensitivity-level.deleteInUse" as *errors.Error // +// // This function is auto-generated. +// func DalSensitivityLevelErrDeleteInUse(mm ...*dalSensitivityLevelActionProps) *errors.Error { var p = &dalSensitivityLevelActionProps{} if len(mm) > 0 { @@ -596,7 +625,9 @@ func DalSensitivityLevelErrDeleteInUse(mm ...*dalSensitivityLevelActionProps) *e // DalSensitivityLevelErrNotAllowedToManage returns "system:dal-sensitivity-level.notAllowedToManage" as *errors.Error // +// // This function is auto-generated. +// func DalSensitivityLevelErrNotAllowedToManage(mm ...*dalSensitivityLevelActionProps) *errors.Error { var p = &dalSensitivityLevelActionProps{} if len(mm) > 0 { @@ -636,6 +667,7 @@ func DalSensitivityLevelErrNotAllowedToManage(mm ...*dalSensitivityLevelActionPr // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc dalSensitivityLevel) recordAction(ctx context.Context, props *dalSensitivityLevelActionProps, actionFn func(...*dalSensitivityLevelActionProps) *dalSensitivityLevelAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/data_privacy_request_actions.gen.go b/server/system/service/data_privacy_request_actions.gen.go index 9b6771bfc..a0f5a6c16 100644 --- a/server/system/service/data_privacy_request_actions.gen.go +++ b/server/system/service/data_privacy_request_actions.gen.go @@ -55,6 +55,7 @@ var ( // setDataPrivacyRequest updates dataPrivacyActionProps's dataPrivacyRequest // // This function is auto-generated. +// func (p *dataPrivacyActionProps) setDataPrivacyRequest(dataPrivacyRequest *types.DataPrivacyRequest) *dataPrivacyActionProps { p.dataPrivacyRequest = dataPrivacyRequest return p @@ -63,6 +64,7 @@ func (p *dataPrivacyActionProps) setDataPrivacyRequest(dataPrivacyRequest *types // setNew updates dataPrivacyActionProps's new // // This function is auto-generated. +// func (p *dataPrivacyActionProps) setNew(new *types.DataPrivacyRequest) *dataPrivacyActionProps { p.new = new return p @@ -71,6 +73,7 @@ func (p *dataPrivacyActionProps) setNew(new *types.DataPrivacyRequest) *dataPriv // setUpdate updates dataPrivacyActionProps's update // // This function is auto-generated. +// func (p *dataPrivacyActionProps) setUpdate(update *types.DataPrivacyRequest) *dataPrivacyActionProps { p.update = update return p @@ -79,6 +82,7 @@ func (p *dataPrivacyActionProps) setUpdate(update *types.DataPrivacyRequest) *da // setFilter updates dataPrivacyActionProps's filter // // This function is auto-generated. +// func (p *dataPrivacyActionProps) setFilter(filter *types.DataPrivacyRequestFilter) *dataPrivacyActionProps { p.filter = filter return p @@ -87,6 +91,7 @@ func (p *dataPrivacyActionProps) setFilter(filter *types.DataPrivacyRequestFilte // Serialize converts dataPrivacyActionProps to actionlog.Meta // // This function is auto-generated. +// func (p dataPrivacyActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -115,6 +120,7 @@ func (p dataPrivacyActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p dataPrivacyActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -201,6 +207,7 @@ func (p dataPrivacyActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *dataPrivacyAction) String() string { var props = &dataPrivacyActionProps{} @@ -228,6 +235,7 @@ func (e *dataPrivacyAction) ToAction() *actionlog.Action { // DataPrivacyActionSearch returns "system:data-privacy-request.search" action // // This function is auto-generated. +// func DataPrivacyActionSearch(props ...*dataPrivacyActionProps) *dataPrivacyAction { a := &dataPrivacyAction{ timestamp: time.Now(), @@ -247,6 +255,7 @@ func DataPrivacyActionSearch(props ...*dataPrivacyActionProps) *dataPrivacyActio // DataPrivacyActionLookup returns "system:data-privacy-request.lookup" action // // This function is auto-generated. +// func DataPrivacyActionLookup(props ...*dataPrivacyActionProps) *dataPrivacyAction { a := &dataPrivacyAction{ timestamp: time.Now(), @@ -266,6 +275,7 @@ func DataPrivacyActionLookup(props ...*dataPrivacyActionProps) *dataPrivacyActio // DataPrivacyActionCreate returns "system:data-privacy-request.create" action // // This function is auto-generated. +// func DataPrivacyActionCreate(props ...*dataPrivacyActionProps) *dataPrivacyAction { a := &dataPrivacyAction{ timestamp: time.Now(), @@ -285,6 +295,7 @@ func DataPrivacyActionCreate(props ...*dataPrivacyActionProps) *dataPrivacyActio // DataPrivacyActionUpdate returns "system:data-privacy-request.update" action // // This function is auto-generated. +// func DataPrivacyActionUpdate(props ...*dataPrivacyActionProps) *dataPrivacyAction { a := &dataPrivacyAction{ timestamp: time.Now(), @@ -304,6 +315,7 @@ func DataPrivacyActionUpdate(props ...*dataPrivacyActionProps) *dataPrivacyActio // DataPrivacyActionApprove returns "system:data-privacy-request.approve" action // // This function is auto-generated. +// func DataPrivacyActionApprove(props ...*dataPrivacyActionProps) *dataPrivacyAction { a := &dataPrivacyAction{ timestamp: time.Now(), @@ -326,7 +338,9 @@ func DataPrivacyActionApprove(props ...*dataPrivacyActionProps) *dataPrivacyActi // DataPrivacyErrGeneric returns "system:data-privacy-request.generic" as *errors.Error // +// // This function is auto-generated. +// func DataPrivacyErrGeneric(mm ...*dataPrivacyActionProps) *errors.Error { var p = &dataPrivacyActionProps{} if len(mm) > 0 { @@ -360,7 +374,9 @@ func DataPrivacyErrGeneric(mm ...*dataPrivacyActionProps) *errors.Error { // DataPrivacyErrNotFound returns "system:data-privacy-request.notFound" as *errors.Error // +// // This function is auto-generated. +// func DataPrivacyErrNotFound(mm ...*dataPrivacyActionProps) *errors.Error { var p = &dataPrivacyActionProps{} if len(mm) > 0 { @@ -392,7 +408,9 @@ func DataPrivacyErrNotFound(mm ...*dataPrivacyActionProps) *errors.Error { // DataPrivacyErrInvalidID returns "system:data-privacy-request.invalidID" as *errors.Error // +// // This function is auto-generated. +// func DataPrivacyErrInvalidID(mm ...*dataPrivacyActionProps) *errors.Error { var p = &dataPrivacyActionProps{} if len(mm) > 0 { @@ -424,7 +442,9 @@ func DataPrivacyErrInvalidID(mm ...*dataPrivacyActionProps) *errors.Error { // DataPrivacyErrInvalidKind returns "system:data-privacy-request.invalidKind" as *errors.Error // +// // This function is auto-generated. +// func DataPrivacyErrInvalidKind(mm ...*dataPrivacyActionProps) *errors.Error { var p = &dataPrivacyActionProps{} if len(mm) > 0 { @@ -456,7 +476,9 @@ func DataPrivacyErrInvalidKind(mm ...*dataPrivacyActionProps) *errors.Error { // DataPrivacyErrInvalidStatus returns "system:data-privacy-request.invalidStatus" as *errors.Error // +// // This function is auto-generated. +// func DataPrivacyErrInvalidStatus(mm ...*dataPrivacyActionProps) *errors.Error { var p = &dataPrivacyActionProps{} if len(mm) > 0 { @@ -488,7 +510,9 @@ func DataPrivacyErrInvalidStatus(mm ...*dataPrivacyActionProps) *errors.Error { // DataPrivacyErrNotAllowedToRead returns "system:data-privacy-request.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func DataPrivacyErrNotAllowedToRead(mm ...*dataPrivacyActionProps) *errors.Error { var p = &dataPrivacyActionProps{} if len(mm) > 0 { @@ -522,7 +546,9 @@ func DataPrivacyErrNotAllowedToRead(mm ...*dataPrivacyActionProps) *errors.Error // DataPrivacyErrNotAllowedToSearch returns "system:data-privacy-request.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func DataPrivacyErrNotAllowedToSearch(mm ...*dataPrivacyActionProps) *errors.Error { var p = &dataPrivacyActionProps{} if len(mm) > 0 { @@ -556,7 +582,9 @@ func DataPrivacyErrNotAllowedToSearch(mm ...*dataPrivacyActionProps) *errors.Err // DataPrivacyErrNotAllowedToCreate returns "system:data-privacy-request.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func DataPrivacyErrNotAllowedToCreate(mm ...*dataPrivacyActionProps) *errors.Error { var p = &dataPrivacyActionProps{} if len(mm) > 0 { @@ -590,7 +618,9 @@ func DataPrivacyErrNotAllowedToCreate(mm ...*dataPrivacyActionProps) *errors.Err // DataPrivacyErrNotAllowedToApprove returns "system:data-privacy-request.notAllowedToApprove" as *errors.Error // +// // This function is auto-generated. +// func DataPrivacyErrNotAllowedToApprove(mm ...*dataPrivacyActionProps) *errors.Error { var p = &dataPrivacyActionProps{} if len(mm) > 0 { @@ -630,6 +660,7 @@ func DataPrivacyErrNotAllowedToApprove(mm ...*dataPrivacyActionProps) *errors.Er // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc dataPrivacy) recordAction(ctx context.Context, props *dataPrivacyActionProps, actionFn func(...*dataPrivacyActionProps) *dataPrivacyAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/queue_actions.gen.go b/server/system/service/queue_actions.gen.go index e6591e41a..60b43ae74 100644 --- a/server/system/service/queue_actions.gen.go +++ b/server/system/service/queue_actions.gen.go @@ -55,6 +55,7 @@ var ( // setQueue updates queueActionProps's queue // // This function is auto-generated. +// func (p *queueActionProps) setQueue(queue *types.Queue) *queueActionProps { p.queue = queue return p @@ -63,6 +64,7 @@ func (p *queueActionProps) setQueue(queue *types.Queue) *queueActionProps { // setNew updates queueActionProps's new // // This function is auto-generated. +// func (p *queueActionProps) setNew(new *types.Queue) *queueActionProps { p.new = new return p @@ -71,6 +73,7 @@ func (p *queueActionProps) setNew(new *types.Queue) *queueActionProps { // setUpdate updates queueActionProps's update // // This function is auto-generated. +// func (p *queueActionProps) setUpdate(update *types.Queue) *queueActionProps { p.update = update return p @@ -79,6 +82,7 @@ func (p *queueActionProps) setUpdate(update *types.Queue) *queueActionProps { // setSearch updates queueActionProps's search // // This function is auto-generated. +// func (p *queueActionProps) setSearch(search *types.QueueFilter) *queueActionProps { p.search = search return p @@ -87,6 +91,7 @@ func (p *queueActionProps) setSearch(search *types.QueueFilter) *queueActionProp // Serialize converts queueActionProps to actionlog.Meta // // This function is auto-generated. +// func (p queueActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -115,6 +120,7 @@ func (p queueActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p queueActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -200,6 +206,7 @@ func (p queueActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *queueAction) String() string { var props = &queueActionProps{} @@ -227,6 +234,7 @@ func (e *queueAction) ToAction() *actionlog.Action { // QueueActionSearch returns "system:queue.search" action // // This function is auto-generated. +// func QueueActionSearch(props ...*queueActionProps) *queueAction { a := &queueAction{ timestamp: time.Now(), @@ -246,6 +254,7 @@ func QueueActionSearch(props ...*queueActionProps) *queueAction { // QueueActionLookup returns "system:queue.lookup" action // // This function is auto-generated. +// func QueueActionLookup(props ...*queueActionProps) *queueAction { a := &queueAction{ timestamp: time.Now(), @@ -265,6 +274,7 @@ func QueueActionLookup(props ...*queueActionProps) *queueAction { // QueueActionCreate returns "system:queue.create" action // // This function is auto-generated. +// func QueueActionCreate(props ...*queueActionProps) *queueAction { a := &queueAction{ timestamp: time.Now(), @@ -284,6 +294,7 @@ func QueueActionCreate(props ...*queueActionProps) *queueAction { // QueueActionUpdate returns "system:queue.update" action // // This function is auto-generated. +// func QueueActionUpdate(props ...*queueActionProps) *queueAction { a := &queueAction{ timestamp: time.Now(), @@ -303,6 +314,7 @@ func QueueActionUpdate(props ...*queueActionProps) *queueAction { // QueueActionDelete returns "system:queue.delete" action // // This function is auto-generated. +// func QueueActionDelete(props ...*queueActionProps) *queueAction { a := &queueAction{ timestamp: time.Now(), @@ -322,6 +334,7 @@ func QueueActionDelete(props ...*queueActionProps) *queueAction { // QueueActionUndelete returns "system:queue.undelete" action // // This function is auto-generated. +// func QueueActionUndelete(props ...*queueActionProps) *queueAction { a := &queueAction{ timestamp: time.Now(), @@ -344,7 +357,9 @@ func QueueActionUndelete(props ...*queueActionProps) *queueAction { // QueueErrGeneric returns "system:queue.generic" as *errors.Error // +// // This function is auto-generated. +// func QueueErrGeneric(mm ...*queueActionProps) *errors.Error { var p = &queueActionProps{} if len(mm) > 0 { @@ -378,7 +393,9 @@ func QueueErrGeneric(mm ...*queueActionProps) *errors.Error { // QueueErrNotFound returns "system:queue.notFound" as *errors.Error // +// // This function is auto-generated. +// func QueueErrNotFound(mm ...*queueActionProps) *errors.Error { var p = &queueActionProps{} if len(mm) > 0 { @@ -410,7 +427,9 @@ func QueueErrNotFound(mm ...*queueActionProps) *errors.Error { // QueueErrInvalidID returns "system:queue.invalidID" as *errors.Error // +// // This function is auto-generated. +// func QueueErrInvalidID(mm ...*queueActionProps) *errors.Error { var p = &queueActionProps{} if len(mm) > 0 { @@ -442,7 +461,9 @@ func QueueErrInvalidID(mm ...*queueActionProps) *errors.Error { // QueueErrInvalidConsumer returns "system:queue.invalidConsumer" as *errors.Error // +// // This function is auto-generated. +// func QueueErrInvalidConsumer(mm ...*queueActionProps) *errors.Error { var p = &queueActionProps{} if len(mm) > 0 { @@ -474,7 +495,9 @@ func QueueErrInvalidConsumer(mm ...*queueActionProps) *errors.Error { // QueueErrAlreadyExists returns "system:queue.alreadyExists" as *errors.Error // +// // This function is auto-generated. +// func QueueErrAlreadyExists(mm ...*queueActionProps) *errors.Error { var p = &queueActionProps{} if len(mm) > 0 { @@ -506,7 +529,9 @@ func QueueErrAlreadyExists(mm ...*queueActionProps) *errors.Error { // QueueErrNotAllowedToCreate returns "system:queue.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func QueueErrNotAllowedToCreate(mm ...*queueActionProps) *errors.Error { var p = &queueActionProps{} if len(mm) > 0 { @@ -540,7 +565,9 @@ func QueueErrNotAllowedToCreate(mm ...*queueActionProps) *errors.Error { // QueueErrNotAllowedToRead returns "system:queue.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func QueueErrNotAllowedToRead(mm ...*queueActionProps) *errors.Error { var p = &queueActionProps{} if len(mm) > 0 { @@ -574,7 +601,9 @@ func QueueErrNotAllowedToRead(mm ...*queueActionProps) *errors.Error { // QueueErrNotAllowedToSearch returns "system:queue.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func QueueErrNotAllowedToSearch(mm ...*queueActionProps) *errors.Error { var p = &queueActionProps{} if len(mm) > 0 { @@ -608,7 +637,9 @@ func QueueErrNotAllowedToSearch(mm ...*queueActionProps) *errors.Error { // QueueErrNotAllowedToUpdate returns "system:queue.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func QueueErrNotAllowedToUpdate(mm ...*queueActionProps) *errors.Error { var p = &queueActionProps{} if len(mm) > 0 { @@ -642,7 +673,9 @@ func QueueErrNotAllowedToUpdate(mm ...*queueActionProps) *errors.Error { // QueueErrNotAllowedToDelete returns "system:queue.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func QueueErrNotAllowedToDelete(mm ...*queueActionProps) *errors.Error { var p = &queueActionProps{} if len(mm) > 0 { @@ -676,7 +709,9 @@ func QueueErrNotAllowedToDelete(mm ...*queueActionProps) *errors.Error { // QueueErrNotAllowedToUndelete returns "system:queue.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func QueueErrNotAllowedToUndelete(mm ...*queueActionProps) *errors.Error { var p = &queueActionProps{} if len(mm) > 0 { @@ -710,7 +745,9 @@ func QueueErrNotAllowedToUndelete(mm ...*queueActionProps) *errors.Error { // QueueErrNotAllowedToWriteTo returns "system:queue.notAllowedToWriteTo" as *errors.Error // +// // This function is auto-generated. +// func QueueErrNotAllowedToWriteTo(mm ...*queueActionProps) *errors.Error { var p = &queueActionProps{} if len(mm) > 0 { @@ -744,7 +781,9 @@ func QueueErrNotAllowedToWriteTo(mm ...*queueActionProps) *errors.Error { // QueueErrNotAllowedToReadFrom returns "system:queue.notAllowedToReadFrom" as *errors.Error // +// // This function is auto-generated. +// func QueueErrNotAllowedToReadFrom(mm ...*queueActionProps) *errors.Error { var p = &queueActionProps{} if len(mm) > 0 { @@ -784,6 +823,7 @@ func QueueErrNotAllowedToReadFrom(mm ...*queueActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc queue) recordAction(ctx context.Context, props *queueActionProps, actionFn func(...*queueActionProps) *queueAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/reminder_actions.gen.go b/server/system/service/reminder_actions.gen.go index 1a9e04fd1..e106c0ab7 100644 --- a/server/system/service/reminder_actions.gen.go +++ b/server/system/service/reminder_actions.gen.go @@ -55,6 +55,7 @@ var ( // setReminder updates reminderActionProps's reminder // // This function is auto-generated. +// func (p *reminderActionProps) setReminder(reminder *types.Reminder) *reminderActionProps { p.reminder = reminder return p @@ -63,6 +64,7 @@ func (p *reminderActionProps) setReminder(reminder *types.Reminder) *reminderAct // setNew updates reminderActionProps's new // // This function is auto-generated. +// func (p *reminderActionProps) setNew(new *types.Reminder) *reminderActionProps { p.new = new return p @@ -71,6 +73,7 @@ func (p *reminderActionProps) setNew(new *types.Reminder) *reminderActionProps { // setUpdated updates reminderActionProps's updated // // This function is auto-generated. +// func (p *reminderActionProps) setUpdated(updated *types.Reminder) *reminderActionProps { p.updated = updated return p @@ -79,6 +82,7 @@ func (p *reminderActionProps) setUpdated(updated *types.Reminder) *reminderActio // setFilter updates reminderActionProps's filter // // This function is auto-generated. +// func (p *reminderActionProps) setFilter(filter *types.ReminderFilter) *reminderActionProps { p.filter = filter return p @@ -87,6 +91,7 @@ func (p *reminderActionProps) setFilter(filter *types.ReminderFilter) *reminderA // Serialize converts reminderActionProps to actionlog.Meta // // This function is auto-generated. +// func (p reminderActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -130,6 +135,7 @@ func (p reminderActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p reminderActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -246,6 +252,7 @@ func (p reminderActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *reminderAction) String() string { var props = &reminderActionProps{} @@ -273,6 +280,7 @@ func (e *reminderAction) ToAction() *actionlog.Action { // ReminderActionSearch returns "system:reminder.search" action // // This function is auto-generated. +// func ReminderActionSearch(props ...*reminderActionProps) *reminderAction { a := &reminderAction{ timestamp: time.Now(), @@ -292,6 +300,7 @@ func ReminderActionSearch(props ...*reminderActionProps) *reminderAction { // ReminderActionLookup returns "system:reminder.lookup" action // // This function is auto-generated. +// func ReminderActionLookup(props ...*reminderActionProps) *reminderAction { a := &reminderAction{ timestamp: time.Now(), @@ -311,6 +320,7 @@ func ReminderActionLookup(props ...*reminderActionProps) *reminderAction { // ReminderActionCreate returns "system:reminder.create" action // // This function is auto-generated. +// func ReminderActionCreate(props ...*reminderActionProps) *reminderAction { a := &reminderAction{ timestamp: time.Now(), @@ -330,6 +340,7 @@ func ReminderActionCreate(props ...*reminderActionProps) *reminderAction { // ReminderActionUpdate returns "system:reminder.update" action // // This function is auto-generated. +// func ReminderActionUpdate(props ...*reminderActionProps) *reminderAction { a := &reminderAction{ timestamp: time.Now(), @@ -349,6 +360,7 @@ func ReminderActionUpdate(props ...*reminderActionProps) *reminderAction { // ReminderActionDelete returns "system:reminder.delete" action // // This function is auto-generated. +// func ReminderActionDelete(props ...*reminderActionProps) *reminderAction { a := &reminderAction{ timestamp: time.Now(), @@ -368,6 +380,7 @@ func ReminderActionDelete(props ...*reminderActionProps) *reminderAction { // ReminderActionDismiss returns "system:reminder.dismiss" action // // This function is auto-generated. +// func ReminderActionDismiss(props ...*reminderActionProps) *reminderAction { a := &reminderAction{ timestamp: time.Now(), @@ -387,6 +400,7 @@ func ReminderActionDismiss(props ...*reminderActionProps) *reminderAction { // ReminderActionUndismiss returns "system:reminder.undismiss" action // // This function is auto-generated. +// func ReminderActionUndismiss(props ...*reminderActionProps) *reminderAction { a := &reminderAction{ timestamp: time.Now(), @@ -406,6 +420,7 @@ func ReminderActionUndismiss(props ...*reminderActionProps) *reminderAction { // ReminderActionSnooze returns "system:reminder.snooze" action // // This function is auto-generated. +// func ReminderActionSnooze(props ...*reminderActionProps) *reminderAction { a := &reminderAction{ timestamp: time.Now(), @@ -428,7 +443,9 @@ func ReminderActionSnooze(props ...*reminderActionProps) *reminderAction { // ReminderErrGeneric returns "system:reminder.generic" as *errors.Error // +// // This function is auto-generated. +// func ReminderErrGeneric(mm ...*reminderActionProps) *errors.Error { var p = &reminderActionProps{} if len(mm) > 0 { @@ -462,7 +479,9 @@ func ReminderErrGeneric(mm ...*reminderActionProps) *errors.Error { // ReminderErrNotFound returns "system:reminder.notFound" as *errors.Error // +// // This function is auto-generated. +// func ReminderErrNotFound(mm ...*reminderActionProps) *errors.Error { var p = &reminderActionProps{} if len(mm) > 0 { @@ -494,7 +513,9 @@ func ReminderErrNotFound(mm ...*reminderActionProps) *errors.Error { // ReminderErrInvalidID returns "system:reminder.invalidID" as *errors.Error // +// // This function is auto-generated. +// func ReminderErrInvalidID(mm ...*reminderActionProps) *errors.Error { var p = &reminderActionProps{} if len(mm) > 0 { @@ -526,7 +547,9 @@ func ReminderErrInvalidID(mm ...*reminderActionProps) *errors.Error { // ReminderErrNotAllowedToAssign returns "system:reminder.notAllowedToAssign" as *errors.Error // +// // This function is auto-generated. +// func ReminderErrNotAllowedToAssign(mm ...*reminderActionProps) *errors.Error { var p = &reminderActionProps{} if len(mm) > 0 { @@ -558,7 +581,9 @@ func ReminderErrNotAllowedToAssign(mm ...*reminderActionProps) *errors.Error { // ReminderErrNotAllowedToDismiss returns "system:reminder.notAllowedToDismiss" as *errors.Error // +// // This function is auto-generated. +// func ReminderErrNotAllowedToDismiss(mm ...*reminderActionProps) *errors.Error { var p = &reminderActionProps{} if len(mm) > 0 { @@ -590,7 +615,9 @@ func ReminderErrNotAllowedToDismiss(mm ...*reminderActionProps) *errors.Error { // ReminderErrNotAllowedToUndismiss returns "system:reminder.notAllowedToUndismiss" as *errors.Error // +// // This function is auto-generated. +// func ReminderErrNotAllowedToUndismiss(mm ...*reminderActionProps) *errors.Error { var p = &reminderActionProps{} if len(mm) > 0 { @@ -622,7 +649,9 @@ func ReminderErrNotAllowedToUndismiss(mm ...*reminderActionProps) *errors.Error // ReminderErrNotAllowedToRead returns "system:reminder.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func ReminderErrNotAllowedToRead(mm ...*reminderActionProps) *errors.Error { var p = &reminderActionProps{} if len(mm) > 0 { @@ -660,6 +689,7 @@ func ReminderErrNotAllowedToRead(mm ...*reminderActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc reminder) recordAction(ctx context.Context, props *reminderActionProps, actionFn func(...*reminderActionProps) *reminderAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/report_actions.gen.go b/server/system/service/report_actions.gen.go index 5bae4342d..3119547da 100644 --- a/server/system/service/report_actions.gen.go +++ b/server/system/service/report_actions.gen.go @@ -55,6 +55,7 @@ var ( // setReport updates reportActionProps's report // // This function is auto-generated. +// func (p *reportActionProps) setReport(report *types.Report) *reportActionProps { p.report = report return p @@ -63,6 +64,7 @@ func (p *reportActionProps) setReport(report *types.Report) *reportActionProps { // setNew updates reportActionProps's new // // This function is auto-generated. +// func (p *reportActionProps) setNew(new *types.Report) *reportActionProps { p.new = new return p @@ -71,6 +73,7 @@ func (p *reportActionProps) setNew(new *types.Report) *reportActionProps { // setUpdate updates reportActionProps's update // // This function is auto-generated. +// func (p *reportActionProps) setUpdate(update *types.Report) *reportActionProps { p.update = update return p @@ -79,6 +82,7 @@ func (p *reportActionProps) setUpdate(update *types.Report) *reportActionProps { // setFilter updates reportActionProps's filter // // This function is auto-generated. +// func (p *reportActionProps) setFilter(filter *types.ReportFilter) *reportActionProps { p.filter = filter return p @@ -87,6 +91,7 @@ func (p *reportActionProps) setFilter(filter *types.ReportFilter) *reportActionP // Serialize converts reportActionProps to actionlog.Meta // // This function is auto-generated. +// func (p reportActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -116,6 +121,7 @@ func (p reportActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p reportActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -204,6 +210,7 @@ func (p reportActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *reportAction) String() string { var props = &reportActionProps{} @@ -231,6 +238,7 @@ func (e *reportAction) ToAction() *actionlog.Action { // ReportActionSearch returns "system:report.search" action // // This function is auto-generated. +// func ReportActionSearch(props ...*reportActionProps) *reportAction { a := &reportAction{ timestamp: time.Now(), @@ -250,6 +258,7 @@ func ReportActionSearch(props ...*reportActionProps) *reportAction { // ReportActionLookup returns "system:report.lookup" action // // This function is auto-generated. +// func ReportActionLookup(props ...*reportActionProps) *reportAction { a := &reportAction{ timestamp: time.Now(), @@ -269,6 +278,7 @@ func ReportActionLookup(props ...*reportActionProps) *reportAction { // ReportActionCreate returns "system:report.create" action // // This function is auto-generated. +// func ReportActionCreate(props ...*reportActionProps) *reportAction { a := &reportAction{ timestamp: time.Now(), @@ -288,6 +298,7 @@ func ReportActionCreate(props ...*reportActionProps) *reportAction { // ReportActionUpdate returns "system:report.update" action // // This function is auto-generated. +// func ReportActionUpdate(props ...*reportActionProps) *reportAction { a := &reportAction{ timestamp: time.Now(), @@ -307,6 +318,7 @@ func ReportActionUpdate(props ...*reportActionProps) *reportAction { // ReportActionDelete returns "system:report.delete" action // // This function is auto-generated. +// func ReportActionDelete(props ...*reportActionProps) *reportAction { a := &reportAction{ timestamp: time.Now(), @@ -326,6 +338,7 @@ func ReportActionDelete(props ...*reportActionProps) *reportAction { // ReportActionUndelete returns "system:report.undelete" action // // This function is auto-generated. +// func ReportActionUndelete(props ...*reportActionProps) *reportAction { a := &reportAction{ timestamp: time.Now(), @@ -345,6 +358,7 @@ func ReportActionUndelete(props ...*reportActionProps) *reportAction { // ReportActionRun returns "system:report.run" action // // This function is auto-generated. +// func ReportActionRun(props ...*reportActionProps) *reportAction { a := &reportAction{ timestamp: time.Now(), @@ -367,7 +381,9 @@ func ReportActionRun(props ...*reportActionProps) *reportAction { // ReportErrGeneric returns "system:report.generic" as *errors.Error // +// // This function is auto-generated. +// func ReportErrGeneric(mm ...*reportActionProps) *errors.Error { var p = &reportActionProps{} if len(mm) > 0 { @@ -401,7 +417,9 @@ func ReportErrGeneric(mm ...*reportActionProps) *errors.Error { // ReportErrNotFound returns "system:report.notFound" as *errors.Error // +// // This function is auto-generated. +// func ReportErrNotFound(mm ...*reportActionProps) *errors.Error { var p = &reportActionProps{} if len(mm) > 0 { @@ -433,7 +451,9 @@ func ReportErrNotFound(mm ...*reportActionProps) *errors.Error { // ReportErrInvalidID returns "system:report.invalidID" as *errors.Error // +// // This function is auto-generated. +// func ReportErrInvalidID(mm ...*reportActionProps) *errors.Error { var p = &reportActionProps{} if len(mm) > 0 { @@ -465,7 +485,9 @@ func ReportErrInvalidID(mm ...*reportActionProps) *errors.Error { // ReportErrNotAllowedToRead returns "system:report.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func ReportErrNotAllowedToRead(mm ...*reportActionProps) *errors.Error { var p = &reportActionProps{} if len(mm) > 0 { @@ -499,7 +521,9 @@ func ReportErrNotAllowedToRead(mm ...*reportActionProps) *errors.Error { // ReportErrNotAllowedToSearch returns "system:report.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func ReportErrNotAllowedToSearch(mm ...*reportActionProps) *errors.Error { var p = &reportActionProps{} if len(mm) > 0 { @@ -533,7 +557,9 @@ func ReportErrNotAllowedToSearch(mm ...*reportActionProps) *errors.Error { // ReportErrNotAllowedToListReports returns "system:report.notAllowedToListReports" as *errors.Error // +// // This function is auto-generated. +// func ReportErrNotAllowedToListReports(mm ...*reportActionProps) *errors.Error { var p = &reportActionProps{} if len(mm) > 0 { @@ -567,7 +593,9 @@ func ReportErrNotAllowedToListReports(mm ...*reportActionProps) *errors.Error { // ReportErrNotAllowedToCreate returns "system:report.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func ReportErrNotAllowedToCreate(mm ...*reportActionProps) *errors.Error { var p = &reportActionProps{} if len(mm) > 0 { @@ -601,7 +629,9 @@ func ReportErrNotAllowedToCreate(mm ...*reportActionProps) *errors.Error { // ReportErrNotAllowedToUpdate returns "system:report.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func ReportErrNotAllowedToUpdate(mm ...*reportActionProps) *errors.Error { var p = &reportActionProps{} if len(mm) > 0 { @@ -635,7 +665,9 @@ func ReportErrNotAllowedToUpdate(mm ...*reportActionProps) *errors.Error { // ReportErrNotAllowedToDelete returns "system:report.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func ReportErrNotAllowedToDelete(mm ...*reportActionProps) *errors.Error { var p = &reportActionProps{} if len(mm) > 0 { @@ -669,7 +701,9 @@ func ReportErrNotAllowedToDelete(mm ...*reportActionProps) *errors.Error { // ReportErrNotAllowedToUndelete returns "system:report.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func ReportErrNotAllowedToUndelete(mm ...*reportActionProps) *errors.Error { var p = &reportActionProps{} if len(mm) > 0 { @@ -703,7 +737,9 @@ func ReportErrNotAllowedToUndelete(mm ...*reportActionProps) *errors.Error { // ReportErrNotAllowedToRun returns "system:report.notAllowedToRun" as *errors.Error // +// // This function is auto-generated. +// func ReportErrNotAllowedToRun(mm ...*reportActionProps) *errors.Error { var p = &reportActionProps{} if len(mm) > 0 { @@ -737,7 +773,9 @@ func ReportErrNotAllowedToRun(mm ...*reportActionProps) *errors.Error { // ReportErrInvalidConfiguration returns "system:report.invalidConfiguration" as *errors.Error // +// // This function is auto-generated. +// func ReportErrInvalidConfiguration(mm ...*reportActionProps) *errors.Error { var p = &reportActionProps{} if len(mm) > 0 { @@ -777,6 +815,7 @@ func ReportErrInvalidConfiguration(mm ...*reportActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc report) recordAction(ctx context.Context, props *reportActionProps, actionFn func(...*reportActionProps) *reportAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/resource_translation_actions.gen.go b/server/system/service/resource_translation_actions.gen.go index fa42cb7fe..d9156d965 100644 --- a/server/system/service/resource_translation_actions.gen.go +++ b/server/system/service/resource_translation_actions.gen.go @@ -55,6 +55,7 @@ var ( // setResourceTranslation updates resourceTranslationActionProps's resourceTranslation // // This function is auto-generated. +// func (p *resourceTranslationActionProps) setResourceTranslation(resourceTranslation *types.ResourceTranslation) *resourceTranslationActionProps { p.resourceTranslation = resourceTranslation return p @@ -63,6 +64,7 @@ func (p *resourceTranslationActionProps) setResourceTranslation(resourceTranslat // setNew updates resourceTranslationActionProps's new // // This function is auto-generated. +// func (p *resourceTranslationActionProps) setNew(new *types.ResourceTranslation) *resourceTranslationActionProps { p.new = new return p @@ -71,6 +73,7 @@ func (p *resourceTranslationActionProps) setNew(new *types.ResourceTranslation) // setUpdate updates resourceTranslationActionProps's update // // This function is auto-generated. +// func (p *resourceTranslationActionProps) setUpdate(update *types.ResourceTranslation) *resourceTranslationActionProps { p.update = update return p @@ -79,6 +82,7 @@ func (p *resourceTranslationActionProps) setUpdate(update *types.ResourceTransla // setFilter updates resourceTranslationActionProps's filter // // This function is auto-generated. +// func (p *resourceTranslationActionProps) setFilter(filter *types.ResourceTranslationFilter) *resourceTranslationActionProps { p.filter = filter return p @@ -87,6 +91,7 @@ func (p *resourceTranslationActionProps) setFilter(filter *types.ResourceTransla // Serialize converts resourceTranslationActionProps to actionlog.Meta // // This function is auto-generated. +// func (p resourceTranslationActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -126,6 +131,7 @@ func (p resourceTranslationActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p resourceTranslationActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -234,6 +240,7 @@ func (p resourceTranslationActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *resourceTranslationAction) String() string { var props = &resourceTranslationActionProps{} @@ -261,6 +268,7 @@ func (e *resourceTranslationAction) ToAction() *actionlog.Action { // ResourceTranslationActionSearch returns "system:resource-translation.search" action // // This function is auto-generated. +// func ResourceTranslationActionSearch(props ...*resourceTranslationActionProps) *resourceTranslationAction { a := &resourceTranslationAction{ timestamp: time.Now(), @@ -280,6 +288,7 @@ func ResourceTranslationActionSearch(props ...*resourceTranslationActionProps) * // ResourceTranslationActionLookup returns "system:resource-translation.lookup" action // // This function is auto-generated. +// func ResourceTranslationActionLookup(props ...*resourceTranslationActionProps) *resourceTranslationAction { a := &resourceTranslationAction{ timestamp: time.Now(), @@ -299,6 +308,7 @@ func ResourceTranslationActionLookup(props ...*resourceTranslationActionProps) * // ResourceTranslationActionCreate returns "system:resource-translation.create" action // // This function is auto-generated. +// func ResourceTranslationActionCreate(props ...*resourceTranslationActionProps) *resourceTranslationAction { a := &resourceTranslationAction{ timestamp: time.Now(), @@ -318,6 +328,7 @@ func ResourceTranslationActionCreate(props ...*resourceTranslationActionProps) * // ResourceTranslationActionUpdate returns "system:resource-translation.update" action // // This function is auto-generated. +// func ResourceTranslationActionUpdate(props ...*resourceTranslationActionProps) *resourceTranslationAction { a := &resourceTranslationAction{ timestamp: time.Now(), @@ -337,6 +348,7 @@ func ResourceTranslationActionUpdate(props ...*resourceTranslationActionProps) * // ResourceTranslationActionDelete returns "system:resource-translation.delete" action // // This function is auto-generated. +// func ResourceTranslationActionDelete(props ...*resourceTranslationActionProps) *resourceTranslationAction { a := &resourceTranslationAction{ timestamp: time.Now(), @@ -356,6 +368,7 @@ func ResourceTranslationActionDelete(props ...*resourceTranslationActionProps) * // ResourceTranslationActionUndelete returns "system:resource-translation.undelete" action // // This function is auto-generated. +// func ResourceTranslationActionUndelete(props ...*resourceTranslationActionProps) *resourceTranslationAction { a := &resourceTranslationAction{ timestamp: time.Now(), @@ -378,7 +391,9 @@ func ResourceTranslationActionUndelete(props ...*resourceTranslationActionProps) // ResourceTranslationErrGeneric returns "system:resource-translation.generic" as *errors.Error // +// // This function is auto-generated. +// func ResourceTranslationErrGeneric(mm ...*resourceTranslationActionProps) *errors.Error { var p = &resourceTranslationActionProps{} if len(mm) > 0 { @@ -412,7 +427,9 @@ func ResourceTranslationErrGeneric(mm ...*resourceTranslationActionProps) *error // ResourceTranslationErrNotFound returns "system:resource-translation.notFound" as *errors.Error // +// // This function is auto-generated. +// func ResourceTranslationErrNotFound(mm ...*resourceTranslationActionProps) *errors.Error { var p = &resourceTranslationActionProps{} if len(mm) > 0 { @@ -444,7 +461,9 @@ func ResourceTranslationErrNotFound(mm ...*resourceTranslationActionProps) *erro // ResourceTranslationErrInvalidID returns "system:resource-translation.invalidID" as *errors.Error // +// // This function is auto-generated. +// func ResourceTranslationErrInvalidID(mm ...*resourceTranslationActionProps) *errors.Error { var p = &resourceTranslationActionProps{} if len(mm) > 0 { @@ -476,7 +495,9 @@ func ResourceTranslationErrInvalidID(mm ...*resourceTranslationActionProps) *err // ResourceTranslationErrNotAllowedToRead returns "system:resource-translation.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func ResourceTranslationErrNotAllowedToRead(mm ...*resourceTranslationActionProps) *errors.Error { var p = &resourceTranslationActionProps{} if len(mm) > 0 { @@ -510,7 +531,9 @@ func ResourceTranslationErrNotAllowedToRead(mm ...*resourceTranslationActionProp // ResourceTranslationErrNotAllowedToSearch returns "system:resource-translation.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func ResourceTranslationErrNotAllowedToSearch(mm ...*resourceTranslationActionProps) *errors.Error { var p = &resourceTranslationActionProps{} if len(mm) > 0 { @@ -544,7 +567,9 @@ func ResourceTranslationErrNotAllowedToSearch(mm ...*resourceTranslationActionPr // ResourceTranslationErrNotAllowedToManage returns "system:resource-translation.notAllowedToManage" as *errors.Error // +// // This function is auto-generated. +// func ResourceTranslationErrNotAllowedToManage(mm ...*resourceTranslationActionProps) *errors.Error { var p = &resourceTranslationActionProps{} if len(mm) > 0 { @@ -584,6 +609,7 @@ func ResourceTranslationErrNotAllowedToManage(mm ...*resourceTranslationActionPr // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc resourceTranslation) recordAction(ctx context.Context, props *resourceTranslationActionProps, actionFn func(...*resourceTranslationActionProps) *resourceTranslationAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/role_actions.gen.go b/server/system/service/role_actions.gen.go index 7a251a464..0770d0128 100644 --- a/server/system/service/role_actions.gen.go +++ b/server/system/service/role_actions.gen.go @@ -58,6 +58,7 @@ var ( // setMember updates roleActionProps's member // // This function is auto-generated. +// func (p *roleActionProps) setMember(member *types.User) *roleActionProps { p.member = member return p @@ -66,6 +67,7 @@ func (p *roleActionProps) setMember(member *types.User) *roleActionProps { // setRole updates roleActionProps's role // // This function is auto-generated. +// func (p *roleActionProps) setRole(role *types.Role) *roleActionProps { p.role = role return p @@ -74,6 +76,7 @@ func (p *roleActionProps) setRole(role *types.Role) *roleActionProps { // setNew updates roleActionProps's new // // This function is auto-generated. +// func (p *roleActionProps) setNew(new *types.Role) *roleActionProps { p.new = new return p @@ -82,6 +85,7 @@ func (p *roleActionProps) setNew(new *types.Role) *roleActionProps { // setUpdate updates roleActionProps's update // // This function is auto-generated. +// func (p *roleActionProps) setUpdate(update *types.Role) *roleActionProps { p.update = update return p @@ -90,6 +94,7 @@ func (p *roleActionProps) setUpdate(update *types.Role) *roleActionProps { // setExisting updates roleActionProps's existing // // This function is auto-generated. +// func (p *roleActionProps) setExisting(existing *types.Role) *roleActionProps { p.existing = existing return p @@ -98,6 +103,7 @@ func (p *roleActionProps) setExisting(existing *types.Role) *roleActionProps { // setTarget updates roleActionProps's target // // This function is auto-generated. +// func (p *roleActionProps) setTarget(target *types.Role) *roleActionProps { p.target = target return p @@ -106,6 +112,7 @@ func (p *roleActionProps) setTarget(target *types.Role) *roleActionProps { // setFilter updates roleActionProps's filter // // This function is auto-generated. +// func (p *roleActionProps) setFilter(filter *types.RoleFilter) *roleActionProps { p.filter = filter return p @@ -114,6 +121,7 @@ func (p *roleActionProps) setFilter(filter *types.RoleFilter) *roleActionProps { // Serialize converts roleActionProps to actionlog.Meta // // This function is auto-generated. +// func (p roleActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -167,6 +175,7 @@ func (p roleActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p roleActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -321,6 +330,7 @@ func (p roleActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *roleAction) String() string { var props = &roleActionProps{} @@ -348,6 +358,7 @@ func (e *roleAction) ToAction() *actionlog.Action { // RoleActionSearch returns "system:role.search" action // // This function is auto-generated. +// func RoleActionSearch(props ...*roleActionProps) *roleAction { a := &roleAction{ timestamp: time.Now(), @@ -367,6 +378,7 @@ func RoleActionSearch(props ...*roleActionProps) *roleAction { // RoleActionLookup returns "system:role.lookup" action // // This function is auto-generated. +// func RoleActionLookup(props ...*roleActionProps) *roleAction { a := &roleAction{ timestamp: time.Now(), @@ -386,6 +398,7 @@ func RoleActionLookup(props ...*roleActionProps) *roleAction { // RoleActionCreate returns "system:role.create" action // // This function is auto-generated. +// func RoleActionCreate(props ...*roleActionProps) *roleAction { a := &roleAction{ timestamp: time.Now(), @@ -405,6 +418,7 @@ func RoleActionCreate(props ...*roleActionProps) *roleAction { // RoleActionUpdate returns "system:role.update" action // // This function is auto-generated. +// func RoleActionUpdate(props ...*roleActionProps) *roleAction { a := &roleAction{ timestamp: time.Now(), @@ -424,6 +438,7 @@ func RoleActionUpdate(props ...*roleActionProps) *roleAction { // RoleActionDelete returns "system:role.delete" action // // This function is auto-generated. +// func RoleActionDelete(props ...*roleActionProps) *roleAction { a := &roleAction{ timestamp: time.Now(), @@ -443,6 +458,7 @@ func RoleActionDelete(props ...*roleActionProps) *roleAction { // RoleActionUndelete returns "system:role.undelete" action // // This function is auto-generated. +// func RoleActionUndelete(props ...*roleActionProps) *roleAction { a := &roleAction{ timestamp: time.Now(), @@ -462,6 +478,7 @@ func RoleActionUndelete(props ...*roleActionProps) *roleAction { // RoleActionArchive returns "system:role.archive" action // // This function is auto-generated. +// func RoleActionArchive(props ...*roleActionProps) *roleAction { a := &roleAction{ timestamp: time.Now(), @@ -481,6 +498,7 @@ func RoleActionArchive(props ...*roleActionProps) *roleAction { // RoleActionUnarchive returns "system:role.unarchive" action // // This function is auto-generated. +// func RoleActionUnarchive(props ...*roleActionProps) *roleAction { a := &roleAction{ timestamp: time.Now(), @@ -500,6 +518,7 @@ func RoleActionUnarchive(props ...*roleActionProps) *roleAction { // RoleActionMerge returns "system:role.merge" action // // This function is auto-generated. +// func RoleActionMerge(props ...*roleActionProps) *roleAction { a := &roleAction{ timestamp: time.Now(), @@ -519,6 +538,7 @@ func RoleActionMerge(props ...*roleActionProps) *roleAction { // RoleActionMembers returns "system:role.members" action // // This function is auto-generated. +// func RoleActionMembers(props ...*roleActionProps) *roleAction { a := &roleAction{ timestamp: time.Now(), @@ -538,6 +558,7 @@ func RoleActionMembers(props ...*roleActionProps) *roleAction { // RoleActionMemberAdd returns "system:role.memberAdd" action // // This function is auto-generated. +// func RoleActionMemberAdd(props ...*roleActionProps) *roleAction { a := &roleAction{ timestamp: time.Now(), @@ -557,6 +578,7 @@ func RoleActionMemberAdd(props ...*roleActionProps) *roleAction { // RoleActionMemberRemove returns "system:role.memberRemove" action // // This function is auto-generated. +// func RoleActionMemberRemove(props ...*roleActionProps) *roleAction { a := &roleAction{ timestamp: time.Now(), @@ -579,7 +601,9 @@ func RoleActionMemberRemove(props ...*roleActionProps) *roleAction { // RoleErrGeneric returns "system:role.generic" as *errors.Error // +// // This function is auto-generated. +// func RoleErrGeneric(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -613,7 +637,9 @@ func RoleErrGeneric(mm ...*roleActionProps) *errors.Error { // RoleErrNotFound returns "system:role.notFound" as *errors.Error // +// // This function is auto-generated. +// func RoleErrNotFound(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -645,7 +671,9 @@ func RoleErrNotFound(mm ...*roleActionProps) *errors.Error { // RoleErrInvalidID returns "system:role.invalidID" as *errors.Error // +// // This function is auto-generated. +// func RoleErrInvalidID(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -677,7 +705,9 @@ func RoleErrInvalidID(mm ...*roleActionProps) *errors.Error { // RoleErrInvalidHandle returns "system:role.invalidHandle" as *errors.Error // +// // This function is auto-generated. +// func RoleErrInvalidHandle(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -709,7 +739,9 @@ func RoleErrInvalidHandle(mm ...*roleActionProps) *errors.Error { // RoleErrNotAllowedToRead returns "system:role.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func RoleErrNotAllowedToRead(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -743,7 +775,9 @@ func RoleErrNotAllowedToRead(mm ...*roleActionProps) *errors.Error { // RoleErrNotAllowedToSearch returns "system:role.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func RoleErrNotAllowedToSearch(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -777,7 +811,9 @@ func RoleErrNotAllowedToSearch(mm ...*roleActionProps) *errors.Error { // RoleErrNotAllowedToCreate returns "system:role.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func RoleErrNotAllowedToCreate(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -811,7 +847,9 @@ func RoleErrNotAllowedToCreate(mm ...*roleActionProps) *errors.Error { // RoleErrNotAllowedToUpdate returns "system:role.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func RoleErrNotAllowedToUpdate(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -845,7 +883,9 @@ func RoleErrNotAllowedToUpdate(mm ...*roleActionProps) *errors.Error { // RoleErrNotAllowedToDelete returns "system:role.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func RoleErrNotAllowedToDelete(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -879,7 +919,9 @@ func RoleErrNotAllowedToDelete(mm ...*roleActionProps) *errors.Error { // RoleErrNotAllowedToUndelete returns "system:role.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func RoleErrNotAllowedToUndelete(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -913,7 +955,9 @@ func RoleErrNotAllowedToUndelete(mm ...*roleActionProps) *errors.Error { // RoleErrNotAllowedToArchive returns "system:role.notAllowedToArchive" as *errors.Error // +// // This function is auto-generated. +// func RoleErrNotAllowedToArchive(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -947,7 +991,9 @@ func RoleErrNotAllowedToArchive(mm ...*roleActionProps) *errors.Error { // RoleErrNotAllowedToUnarchive returns "system:role.notAllowedToUnarchive" as *errors.Error // +// // This function is auto-generated. +// func RoleErrNotAllowedToUnarchive(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -981,7 +1027,9 @@ func RoleErrNotAllowedToUnarchive(mm ...*roleActionProps) *errors.Error { // RoleErrNotAllowedToCloneRules returns "system:role.notAllowedToCloneRules" as *errors.Error // +// // This function is auto-generated. +// func RoleErrNotAllowedToCloneRules(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -1015,7 +1063,9 @@ func RoleErrNotAllowedToCloneRules(mm ...*roleActionProps) *errors.Error { // RoleErrNotAllowedToManageMembers returns "system:role.notAllowedToManageMembers" as *errors.Error // +// // This function is auto-generated. +// func RoleErrNotAllowedToManageMembers(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -1049,7 +1099,9 @@ func RoleErrNotAllowedToManageMembers(mm ...*roleActionProps) *errors.Error { // RoleErrHandleNotUnique returns "system:role.handleNotUnique" as *errors.Error // +// // This function is auto-generated. +// func RoleErrHandleNotUnique(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -1083,7 +1135,9 @@ func RoleErrHandleNotUnique(mm ...*roleActionProps) *errors.Error { // RoleErrNameNotUnique returns "system:role.nameNotUnique" as *errors.Error // +// // This function is auto-generated. +// func RoleErrNameNotUnique(mm ...*roleActionProps) *errors.Error { var p = &roleActionProps{} if len(mm) > 0 { @@ -1123,6 +1177,7 @@ func RoleErrNameNotUnique(mm ...*roleActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc role) recordAction(ctx context.Context, props *roleActionProps, actionFn func(...*roleActionProps) *roleAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/setting_actions.gen.go b/server/system/service/setting_actions.gen.go index 1b94f2829..994cb6334 100644 --- a/server/system/service/setting_actions.gen.go +++ b/server/system/service/setting_actions.gen.go @@ -52,6 +52,7 @@ var ( // setSettings updates settingsActionProps's settings // // This function is auto-generated. +// func (p *settingsActionProps) setSettings(settings *types.SettingValue) *settingsActionProps { p.settings = settings return p @@ -60,6 +61,7 @@ func (p *settingsActionProps) setSettings(settings *types.SettingValue) *setting // Serialize converts settingsActionProps to actionlog.Meta // // This function is auto-generated. +// func (p settingsActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -76,6 +78,7 @@ func (p settingsActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p settingsActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -120,6 +123,7 @@ func (p settingsActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *settingsAction) String() string { var props = &settingsActionProps{} @@ -147,6 +151,7 @@ func (e *settingsAction) ToAction() *actionlog.Action { // SettingsActionLookup returns "system:setting.lookup" action // // This function is auto-generated. +// func SettingsActionLookup(props ...*settingsActionProps) *settingsAction { a := &settingsAction{ timestamp: time.Now(), @@ -169,7 +174,9 @@ func SettingsActionLookup(props ...*settingsActionProps) *settingsAction { // SettingsErrGeneric returns "system:setting.generic" as *errors.Error // +// // This function is auto-generated. +// func SettingsErrGeneric(mm ...*settingsActionProps) *errors.Error { var p = &settingsActionProps{} if len(mm) > 0 { @@ -203,7 +210,9 @@ func SettingsErrGeneric(mm ...*settingsActionProps) *errors.Error { // SettingsErrNotAllowedToRead returns "system:setting.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func SettingsErrNotAllowedToRead(mm ...*settingsActionProps) *errors.Error { var p = &settingsActionProps{} if len(mm) > 0 { @@ -237,7 +246,9 @@ func SettingsErrNotAllowedToRead(mm ...*settingsActionProps) *errors.Error { // SettingsErrNotAllowedToManage returns "system:setting.notAllowedToManage" as *errors.Error // +// // This function is auto-generated. +// func SettingsErrNotAllowedToManage(mm ...*settingsActionProps) *errors.Error { var p = &settingsActionProps{} if len(mm) > 0 { @@ -271,7 +282,9 @@ func SettingsErrNotAllowedToManage(mm ...*settingsActionProps) *errors.Error { // SettingsErrInvalidPasswordMinLength returns "system:setting.invalidPasswordMinLength" as *errors.Error // +// // This function is auto-generated. +// func SettingsErrInvalidPasswordMinLength(mm ...*settingsActionProps) *errors.Error { var p = &settingsActionProps{} if len(mm) > 0 { @@ -303,7 +316,9 @@ func SettingsErrInvalidPasswordMinLength(mm ...*settingsActionProps) *errors.Err // SettingsErrInvalidPasswordMinUpperCase returns "system:setting.invalidPasswordMinUpperCase" as *errors.Error // +// // This function is auto-generated. +// func SettingsErrInvalidPasswordMinUpperCase(mm ...*settingsActionProps) *errors.Error { var p = &settingsActionProps{} if len(mm) > 0 { @@ -335,7 +350,9 @@ func SettingsErrInvalidPasswordMinUpperCase(mm ...*settingsActionProps) *errors. // SettingsErrInvalidPasswordMinLowerCase returns "system:setting.invalidPasswordMinLowerCase" as *errors.Error // +// // This function is auto-generated. +// func SettingsErrInvalidPasswordMinLowerCase(mm ...*settingsActionProps) *errors.Error { var p = &settingsActionProps{} if len(mm) > 0 { @@ -367,7 +384,9 @@ func SettingsErrInvalidPasswordMinLowerCase(mm ...*settingsActionProps) *errors. // SettingsErrInvalidPasswordMinNumCount returns "system:setting.invalidPasswordMinNumCount" as *errors.Error // +// // This function is auto-generated. +// func SettingsErrInvalidPasswordMinNumCount(mm ...*settingsActionProps) *errors.Error { var p = &settingsActionProps{} if len(mm) > 0 { @@ -399,7 +418,9 @@ func SettingsErrInvalidPasswordMinNumCount(mm ...*settingsActionProps) *errors.E // SettingsErrInvalidPasswordMinSpecialCharCount returns "system:setting.invalidPasswordMinSpecialCharCount" as *errors.Error // +// // This function is auto-generated. +// func SettingsErrInvalidPasswordMinSpecialCharCount(mm ...*settingsActionProps) *errors.Error { var p = &settingsActionProps{} if len(mm) > 0 { @@ -437,6 +458,7 @@ func SettingsErrInvalidPasswordMinSpecialCharCount(mm ...*settingsActionProps) * // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc settings) recordAction(ctx context.Context, props *settingsActionProps, actionFn func(...*settingsActionProps) *settingsAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/sink_actions.gen.go b/server/system/service/sink_actions.gen.go index cd83da27f..11f95a707 100644 --- a/server/system/service/sink_actions.gen.go +++ b/server/system/service/sink_actions.gen.go @@ -56,6 +56,7 @@ var ( // setUrl updates sinkActionProps's url // // This function is auto-generated. +// func (p *sinkActionProps) setUrl(url string) *sinkActionProps { p.url = url return p @@ -64,6 +65,7 @@ func (p *sinkActionProps) setUrl(url string) *sinkActionProps { // setResponseStatus updates sinkActionProps's responseStatus // // This function is auto-generated. +// func (p *sinkActionProps) setResponseStatus(responseStatus int) *sinkActionProps { p.responseStatus = responseStatus return p @@ -72,6 +74,7 @@ func (p *sinkActionProps) setResponseStatus(responseStatus int) *sinkActionProps // setContentType updates sinkActionProps's contentType // // This function is auto-generated. +// func (p *sinkActionProps) setContentType(contentType string) *sinkActionProps { p.contentType = contentType return p @@ -80,6 +83,7 @@ func (p *sinkActionProps) setContentType(contentType string) *sinkActionProps { // setSinkParams updates sinkActionProps's sinkParams // // This function is auto-generated. +// func (p *sinkActionProps) setSinkParams(sinkParams *SinkRequestUrlParams) *sinkActionProps { p.sinkParams = sinkParams return p @@ -88,6 +92,7 @@ func (p *sinkActionProps) setSinkParams(sinkParams *SinkRequestUrlParams) *sinkA // setMailHeader updates sinkActionProps's mailHeader // // This function is auto-generated. +// func (p *sinkActionProps) setMailHeader(mailHeader *types.MailMessageHeader) *sinkActionProps { p.mailHeader = mailHeader return p @@ -96,6 +101,7 @@ func (p *sinkActionProps) setMailHeader(mailHeader *types.MailMessageHeader) *si // Serialize converts sinkActionProps to actionlog.Meta // // This function is auto-generated. +// func (p sinkActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -120,6 +126,7 @@ func (p sinkActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p sinkActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -176,6 +183,7 @@ func (p sinkActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *sinkAction) String() string { var props = &sinkActionProps{} @@ -203,6 +211,7 @@ func (e *sinkAction) ToAction() *actionlog.Action { // SinkActionSign returns "system:sink.sign" action // // This function is auto-generated. +// func SinkActionSign(props ...*sinkActionProps) *sinkAction { a := &sinkAction{ timestamp: time.Now(), @@ -222,6 +231,7 @@ func SinkActionSign(props ...*sinkActionProps) *sinkAction { // SinkActionPreprocess returns "system:sink.preprocess" action // // This function is auto-generated. +// func SinkActionPreprocess(props ...*sinkActionProps) *sinkAction { a := &sinkAction{ timestamp: time.Now(), @@ -241,6 +251,7 @@ func SinkActionPreprocess(props ...*sinkActionProps) *sinkAction { // SinkActionRequest returns "system:sink.request" action // // This function is auto-generated. +// func SinkActionRequest(props ...*sinkActionProps) *sinkAction { a := &sinkAction{ timestamp: time.Now(), @@ -263,7 +274,9 @@ func SinkActionRequest(props ...*sinkActionProps) *sinkAction { // SinkErrGeneric returns "system:sink.generic" as *errors.Error // +// // This function is auto-generated. +// func SinkErrGeneric(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -297,7 +310,9 @@ func SinkErrGeneric(mm ...*sinkActionProps) *errors.Error { // SinkErrFailedToSign returns "system:sink.failedToSign" as *errors.Error // +// // This function is auto-generated. +// func SinkErrFailedToSign(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -329,7 +344,9 @@ func SinkErrFailedToSign(mm ...*sinkActionProps) *errors.Error { // SinkErrFailedToCreateEvent returns "system:sink.failedToCreateEvent" as *errors.Error // +// // This function is auto-generated. +// func SinkErrFailedToCreateEvent(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -361,7 +378,9 @@ func SinkErrFailedToCreateEvent(mm ...*sinkActionProps) *errors.Error { // SinkErrFailedToProcess returns "system:sink.failedToProcess" as *errors.Error // +// // This function is auto-generated. +// func SinkErrFailedToProcess(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -393,7 +412,9 @@ func SinkErrFailedToProcess(mm ...*sinkActionProps) *errors.Error { // SinkErrFailedToRespond returns "system:sink.failedToRespond" as *errors.Error // +// // This function is auto-generated. +// func SinkErrFailedToRespond(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -425,7 +446,9 @@ func SinkErrFailedToRespond(mm ...*sinkActionProps) *errors.Error { // SinkErrMissingSignature returns "system:sink.missingSignature" as *errors.Error // +// // This function is auto-generated. +// func SinkErrMissingSignature(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -457,7 +480,9 @@ func SinkErrMissingSignature(mm ...*sinkActionProps) *errors.Error { // SinkErrInvalidSignatureParam returns "system:sink.invalidSignatureParam" as *errors.Error // +// // This function is auto-generated. +// func SinkErrInvalidSignatureParam(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -489,7 +514,9 @@ func SinkErrInvalidSignatureParam(mm ...*sinkActionProps) *errors.Error { // SinkErrBadSinkParamEncoding returns "system:sink.badSinkParamEncoding" as *errors.Error // +// // This function is auto-generated. +// func SinkErrBadSinkParamEncoding(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -521,7 +548,9 @@ func SinkErrBadSinkParamEncoding(mm ...*sinkActionProps) *errors.Error { // SinkErrInvalidSignature returns "system:sink.invalidSignature" as *errors.Error // +// // This function is auto-generated. +// func SinkErrInvalidSignature(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -553,7 +582,9 @@ func SinkErrInvalidSignature(mm ...*sinkActionProps) *errors.Error { // SinkErrInvalidSinkRequestUrlParams returns "system:sink.invalidSinkRequestUrlParams" as *errors.Error // +// // This function is auto-generated. +// func SinkErrInvalidSinkRequestUrlParams(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -585,7 +616,9 @@ func SinkErrInvalidSinkRequestUrlParams(mm ...*sinkActionProps) *errors.Error { // SinkErrInvalidHttpMethod returns "system:sink.invalidHttpMethod" as *errors.Error // +// // This function is auto-generated. +// func SinkErrInvalidHttpMethod(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -617,7 +650,9 @@ func SinkErrInvalidHttpMethod(mm ...*sinkActionProps) *errors.Error { // SinkErrInvalidContentType returns "system:sink.invalidContentType" as *errors.Error // +// // This function is auto-generated. +// func SinkErrInvalidContentType(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -649,7 +684,9 @@ func SinkErrInvalidContentType(mm ...*sinkActionProps) *errors.Error { // SinkErrInvalidPath returns "system:sink.invalidPath" as *errors.Error // +// // This function is auto-generated. +// func SinkErrInvalidPath(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -681,7 +718,9 @@ func SinkErrInvalidPath(mm ...*sinkActionProps) *errors.Error { // SinkErrMisplacedSignature returns "system:sink.misplacedSignature" as *errors.Error // +// // This function is auto-generated. +// func SinkErrMisplacedSignature(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -713,7 +752,9 @@ func SinkErrMisplacedSignature(mm ...*sinkActionProps) *errors.Error { // SinkErrSignatureExpired returns "system:sink.signatureExpired" as *errors.Error // +// // This function is auto-generated. +// func SinkErrSignatureExpired(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -745,7 +786,9 @@ func SinkErrSignatureExpired(mm ...*sinkActionProps) *errors.Error { // SinkErrContentLengthExceedsMaxAllowedSize returns "system:sink.contentLengthExceedsMaxAllowedSize" as *errors.Error // +// // This function is auto-generated. +// func SinkErrContentLengthExceedsMaxAllowedSize(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -777,7 +820,9 @@ func SinkErrContentLengthExceedsMaxAllowedSize(mm ...*sinkActionProps) *errors.E // SinkErrProcessingError returns "system:sink.processingError" as *errors.Error // +// // This function is auto-generated. +// func SinkErrProcessingError(mm ...*sinkActionProps) *errors.Error { var p = &sinkActionProps{} if len(mm) > 0 { @@ -815,6 +860,7 @@ func SinkErrProcessingError(mm ...*sinkActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc sink) recordAction(ctx context.Context, props *sinkActionProps, actionFn func(...*sinkActionProps) *sinkAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/statistics_actions.gen.go b/server/system/service/statistics_actions.gen.go index e35349f57..d9ec7c8e7 100644 --- a/server/system/service/statistics_actions.gen.go +++ b/server/system/service/statistics_actions.gen.go @@ -51,6 +51,7 @@ var ( // Serialize converts statisticsActionProps to actionlog.Meta // // This function is auto-generated. +// func (p statisticsActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -62,6 +63,7 @@ func (p statisticsActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p statisticsActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -82,6 +84,7 @@ func (p statisticsActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *statisticsAction) String() string { var props = &statisticsActionProps{} @@ -109,6 +112,7 @@ func (e *statisticsAction) ToAction() *actionlog.Action { // StatisticsActionServe returns "system:statistics.serve" action // // This function is auto-generated. +// func StatisticsActionServe(props ...*statisticsActionProps) *statisticsAction { a := &statisticsAction{ timestamp: time.Now(), @@ -131,7 +135,9 @@ func StatisticsActionServe(props ...*statisticsActionProps) *statisticsAction { // StatisticsErrGeneric returns "system:statistics.generic" as *errors.Error // +// // This function is auto-generated. +// func StatisticsErrGeneric(mm ...*statisticsActionProps) *errors.Error { var p = &statisticsActionProps{} if len(mm) > 0 { @@ -165,7 +171,9 @@ func StatisticsErrGeneric(mm ...*statisticsActionProps) *errors.Error { // StatisticsErrNotAllowedToReadStatistics returns "system:statistics.notAllowedToReadStatistics" as *errors.Error // +// // This function is auto-generated. +// func StatisticsErrNotAllowedToReadStatistics(mm ...*statisticsActionProps) *errors.Error { var p = &statisticsActionProps{} if len(mm) > 0 { @@ -203,6 +211,7 @@ func StatisticsErrNotAllowedToReadStatistics(mm ...*statisticsActionProps) *erro // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc statistics) recordAction(ctx context.Context, props *statisticsActionProps, actionFn func(...*statisticsActionProps) *statisticsAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/template_actions.gen.go b/server/system/service/template_actions.gen.go index 4eca88a60..03b479603 100644 --- a/server/system/service/template_actions.gen.go +++ b/server/system/service/template_actions.gen.go @@ -55,6 +55,7 @@ var ( // setTemplate updates templateActionProps's template // // This function is auto-generated. +// func (p *templateActionProps) setTemplate(template *types.Template) *templateActionProps { p.template = template return p @@ -63,6 +64,7 @@ func (p *templateActionProps) setTemplate(template *types.Template) *templateAct // setNew updates templateActionProps's new // // This function is auto-generated. +// func (p *templateActionProps) setNew(new *types.Template) *templateActionProps { p.new = new return p @@ -71,6 +73,7 @@ func (p *templateActionProps) setNew(new *types.Template) *templateActionProps { // setUpdate updates templateActionProps's update // // This function is auto-generated. +// func (p *templateActionProps) setUpdate(update *types.Template) *templateActionProps { p.update = update return p @@ -79,6 +82,7 @@ func (p *templateActionProps) setUpdate(update *types.Template) *templateActionP // setFilter updates templateActionProps's filter // // This function is auto-generated. +// func (p *templateActionProps) setFilter(filter *types.TemplateFilter) *templateActionProps { p.filter = filter return p @@ -87,6 +91,7 @@ func (p *templateActionProps) setFilter(filter *types.TemplateFilter) *templateA // Serialize converts templateActionProps to actionlog.Meta // // This function is auto-generated. +// func (p templateActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -122,6 +127,7 @@ func (p templateActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p templateActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -222,6 +228,7 @@ func (p templateActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *templateAction) String() string { var props = &templateActionProps{} @@ -249,6 +256,7 @@ func (e *templateAction) ToAction() *actionlog.Action { // TemplateActionSearch returns "system:template.search" action // // This function is auto-generated. +// func TemplateActionSearch(props ...*templateActionProps) *templateAction { a := &templateAction{ timestamp: time.Now(), @@ -268,6 +276,7 @@ func TemplateActionSearch(props ...*templateActionProps) *templateAction { // TemplateActionLookup returns "system:template.lookup" action // // This function is auto-generated. +// func TemplateActionLookup(props ...*templateActionProps) *templateAction { a := &templateAction{ timestamp: time.Now(), @@ -287,6 +296,7 @@ func TemplateActionLookup(props ...*templateActionProps) *templateAction { // TemplateActionCreate returns "system:template.create" action // // This function is auto-generated. +// func TemplateActionCreate(props ...*templateActionProps) *templateAction { a := &templateAction{ timestamp: time.Now(), @@ -306,6 +316,7 @@ func TemplateActionCreate(props ...*templateActionProps) *templateAction { // TemplateActionUpdate returns "system:template.update" action // // This function is auto-generated. +// func TemplateActionUpdate(props ...*templateActionProps) *templateAction { a := &templateAction{ timestamp: time.Now(), @@ -325,6 +336,7 @@ func TemplateActionUpdate(props ...*templateActionProps) *templateAction { // TemplateActionDelete returns "system:template.delete" action // // This function is auto-generated. +// func TemplateActionDelete(props ...*templateActionProps) *templateAction { a := &templateAction{ timestamp: time.Now(), @@ -344,6 +356,7 @@ func TemplateActionDelete(props ...*templateActionProps) *templateAction { // TemplateActionUndelete returns "system:template.undelete" action // // This function is auto-generated. +// func TemplateActionUndelete(props ...*templateActionProps) *templateAction { a := &templateAction{ timestamp: time.Now(), @@ -363,6 +376,7 @@ func TemplateActionUndelete(props ...*templateActionProps) *templateAction { // TemplateActionRender returns "system:template.render" action // // This function is auto-generated. +// func TemplateActionRender(props ...*templateActionProps) *templateAction { a := &templateAction{ timestamp: time.Now(), @@ -385,7 +399,9 @@ func TemplateActionRender(props ...*templateActionProps) *templateAction { // TemplateErrGeneric returns "system:template.generic" as *errors.Error // +// // This function is auto-generated. +// func TemplateErrGeneric(mm ...*templateActionProps) *errors.Error { var p = &templateActionProps{} if len(mm) > 0 { @@ -419,7 +435,9 @@ func TemplateErrGeneric(mm ...*templateActionProps) *errors.Error { // TemplateErrNotFound returns "system:template.notFound" as *errors.Error // +// // This function is auto-generated. +// func TemplateErrNotFound(mm ...*templateActionProps) *errors.Error { var p = &templateActionProps{} if len(mm) > 0 { @@ -451,7 +469,9 @@ func TemplateErrNotFound(mm ...*templateActionProps) *errors.Error { // TemplateErrInvalidID returns "system:template.invalidID" as *errors.Error // +// // This function is auto-generated. +// func TemplateErrInvalidID(mm ...*templateActionProps) *errors.Error { var p = &templateActionProps{} if len(mm) > 0 { @@ -483,7 +503,9 @@ func TemplateErrInvalidID(mm ...*templateActionProps) *errors.Error { // TemplateErrInvalidHandle returns "system:template.invalidHandle" as *errors.Error // +// // This function is auto-generated. +// func TemplateErrInvalidHandle(mm ...*templateActionProps) *errors.Error { var p = &templateActionProps{} if len(mm) > 0 { @@ -515,7 +537,9 @@ func TemplateErrInvalidHandle(mm ...*templateActionProps) *errors.Error { // TemplateErrMissingShort returns "system:template.missingShort" as *errors.Error // +// // This function is auto-generated. +// func TemplateErrMissingShort(mm ...*templateActionProps) *errors.Error { var p = &templateActionProps{} if len(mm) > 0 { @@ -547,7 +571,9 @@ func TemplateErrMissingShort(mm ...*templateActionProps) *errors.Error { // TemplateErrCannotRenderPartial returns "system:template.cannotRenderPartial" as *errors.Error // +// // This function is auto-generated. +// func TemplateErrCannotRenderPartial(mm ...*templateActionProps) *errors.Error { var p = &templateActionProps{} if len(mm) > 0 { @@ -579,7 +605,9 @@ func TemplateErrCannotRenderPartial(mm ...*templateActionProps) *errors.Error { // TemplateErrNotAllowedToRead returns "system:template.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func TemplateErrNotAllowedToRead(mm ...*templateActionProps) *errors.Error { var p = &templateActionProps{} if len(mm) > 0 { @@ -613,7 +641,9 @@ func TemplateErrNotAllowedToRead(mm ...*templateActionProps) *errors.Error { // TemplateErrNotAllowedToSearch returns "system:template.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func TemplateErrNotAllowedToSearch(mm ...*templateActionProps) *errors.Error { var p = &templateActionProps{} if len(mm) > 0 { @@ -647,7 +677,9 @@ func TemplateErrNotAllowedToSearch(mm ...*templateActionProps) *errors.Error { // TemplateErrNotAllowedToCreate returns "system:template.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func TemplateErrNotAllowedToCreate(mm ...*templateActionProps) *errors.Error { var p = &templateActionProps{} if len(mm) > 0 { @@ -681,7 +713,9 @@ func TemplateErrNotAllowedToCreate(mm ...*templateActionProps) *errors.Error { // TemplateErrNotAllowedToUpdate returns "system:template.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func TemplateErrNotAllowedToUpdate(mm ...*templateActionProps) *errors.Error { var p = &templateActionProps{} if len(mm) > 0 { @@ -715,7 +749,9 @@ func TemplateErrNotAllowedToUpdate(mm ...*templateActionProps) *errors.Error { // TemplateErrNotAllowedToDelete returns "system:template.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func TemplateErrNotAllowedToDelete(mm ...*templateActionProps) *errors.Error { var p = &templateActionProps{} if len(mm) > 0 { @@ -749,7 +785,9 @@ func TemplateErrNotAllowedToDelete(mm ...*templateActionProps) *errors.Error { // TemplateErrNotAllowedToUndelete returns "system:template.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func TemplateErrNotAllowedToUndelete(mm ...*templateActionProps) *errors.Error { var p = &templateActionProps{} if len(mm) > 0 { @@ -783,7 +821,9 @@ func TemplateErrNotAllowedToUndelete(mm ...*templateActionProps) *errors.Error { // TemplateErrNotAllowedToRender returns "system:template.notAllowedToRender" as *errors.Error // +// // This function is auto-generated. +// func TemplateErrNotAllowedToRender(mm ...*templateActionProps) *errors.Error { var p = &templateActionProps{} if len(mm) > 0 { @@ -823,6 +863,7 @@ func TemplateErrNotAllowedToRender(mm ...*templateActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc template) recordAction(ctx context.Context, props *templateActionProps, actionFn func(...*templateActionProps) *templateAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is diff --git a/server/system/service/user_actions.gen.go b/server/system/service/user_actions.gen.go index 800eaa57f..c7ab25539 100644 --- a/server/system/service/user_actions.gen.go +++ b/server/system/service/user_actions.gen.go @@ -56,6 +56,7 @@ var ( // setUser updates userActionProps's user // // This function is auto-generated. +// func (p *userActionProps) setUser(user *types.User) *userActionProps { p.user = user return p @@ -64,6 +65,7 @@ func (p *userActionProps) setUser(user *types.User) *userActionProps { // setNew updates userActionProps's new // // This function is auto-generated. +// func (p *userActionProps) setNew(new *types.User) *userActionProps { p.new = new return p @@ -72,6 +74,7 @@ func (p *userActionProps) setNew(new *types.User) *userActionProps { // setUpdate updates userActionProps's update // // This function is auto-generated. +// func (p *userActionProps) setUpdate(update *types.User) *userActionProps { p.update = update return p @@ -80,6 +83,7 @@ func (p *userActionProps) setUpdate(update *types.User) *userActionProps { // setExisting updates userActionProps's existing // // This function is auto-generated. +// func (p *userActionProps) setExisting(existing *types.User) *userActionProps { p.existing = existing return p @@ -88,6 +92,7 @@ func (p *userActionProps) setExisting(existing *types.User) *userActionProps { // setFilter updates userActionProps's filter // // This function is auto-generated. +// func (p *userActionProps) setFilter(filter *types.UserFilter) *userActionProps { p.filter = filter return p @@ -96,6 +101,7 @@ func (p *userActionProps) setFilter(filter *types.UserFilter) *userActionProps { // Serialize converts userActionProps to actionlog.Meta // // This function is auto-generated. +// func (p userActionProps) Serialize() actionlog.Meta { var ( m = make(actionlog.Meta) @@ -147,6 +153,7 @@ func (p userActionProps) Serialize() actionlog.Meta { // tr translates string and replaces meta value placeholder with values // // This function is auto-generated. +// func (p userActionProps) Format(in string, err error) string { var ( pairs = []string{"{{err}}"} @@ -285,6 +292,7 @@ func (p userActionProps) Format(in string, err error) string { // String returns loggable description as string // // This function is auto-generated. +// func (a *userAction) String() string { var props = &userActionProps{} @@ -312,6 +320,7 @@ func (e *userAction) ToAction() *actionlog.Action { // UserActionSearch returns "system:user.search" action // // This function is auto-generated. +// func UserActionSearch(props ...*userActionProps) *userAction { a := &userAction{ timestamp: time.Now(), @@ -331,6 +340,7 @@ func UserActionSearch(props ...*userActionProps) *userAction { // UserActionLookup returns "system:user.lookup" action // // This function is auto-generated. +// func UserActionLookup(props ...*userActionProps) *userAction { a := &userAction{ timestamp: time.Now(), @@ -350,6 +360,7 @@ func UserActionLookup(props ...*userActionProps) *userAction { // UserActionCreate returns "system:user.create" action // // This function is auto-generated. +// func UserActionCreate(props ...*userActionProps) *userAction { a := &userAction{ timestamp: time.Now(), @@ -369,6 +380,7 @@ func UserActionCreate(props ...*userActionProps) *userAction { // UserActionUpdate returns "system:user.update" action // // This function is auto-generated. +// func UserActionUpdate(props ...*userActionProps) *userAction { a := &userAction{ timestamp: time.Now(), @@ -388,6 +400,7 @@ func UserActionUpdate(props ...*userActionProps) *userAction { // UserActionDelete returns "system:user.delete" action // // This function is auto-generated. +// func UserActionDelete(props ...*userActionProps) *userAction { a := &userAction{ timestamp: time.Now(), @@ -407,6 +420,7 @@ func UserActionDelete(props ...*userActionProps) *userAction { // UserActionUndelete returns "system:user.undelete" action // // This function is auto-generated. +// func UserActionUndelete(props ...*userActionProps) *userAction { a := &userAction{ timestamp: time.Now(), @@ -426,6 +440,7 @@ func UserActionUndelete(props ...*userActionProps) *userAction { // UserActionSuspend returns "system:user.suspend" action // // This function is auto-generated. +// func UserActionSuspend(props ...*userActionProps) *userAction { a := &userAction{ timestamp: time.Now(), @@ -445,6 +460,7 @@ func UserActionSuspend(props ...*userActionProps) *userAction { // UserActionUnsuspend returns "system:user.unsuspend" action // // This function is auto-generated. +// func UserActionUnsuspend(props ...*userActionProps) *userAction { a := &userAction{ timestamp: time.Now(), @@ -464,6 +480,7 @@ func UserActionUnsuspend(props ...*userActionProps) *userAction { // UserActionSetPassword returns "system:user.setPassword" action // // This function is auto-generated. +// func UserActionSetPassword(props ...*userActionProps) *userAction { a := &userAction{ timestamp: time.Now(), @@ -483,6 +500,7 @@ func UserActionSetPassword(props ...*userActionProps) *userAction { // UserActionRemovePassword returns "system:user.removePassword" action // // This function is auto-generated. +// func UserActionRemovePassword(props ...*userActionProps) *userAction { a := &userAction{ timestamp: time.Now(), @@ -502,6 +520,7 @@ func UserActionRemovePassword(props ...*userActionProps) *userAction { // UserActionDeleteAuthTokens returns "system:user.deleteAuthTokens" action // // This function is auto-generated. +// func UserActionDeleteAuthTokens(props ...*userActionProps) *userAction { a := &userAction{ timestamp: time.Now(), @@ -521,6 +540,7 @@ func UserActionDeleteAuthTokens(props ...*userActionProps) *userAction { // UserActionDeleteAuthSessions returns "system:user.deleteAuthSessions" action // // This function is auto-generated. +// func UserActionDeleteAuthSessions(props ...*userActionProps) *userAction { a := &userAction{ timestamp: time.Now(), @@ -600,7 +620,9 @@ func UserActionDeleteAvatar(props ...*userActionProps) *userAction { // UserErrGeneric returns "system:user.generic" as *errors.Error // +// // This function is auto-generated. +// func UserErrGeneric(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -634,7 +656,9 @@ func UserErrGeneric(mm ...*userActionProps) *errors.Error { // UserErrNotFound returns "system:user.notFound" as *errors.Error // +// // This function is auto-generated. +// func UserErrNotFound(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -666,7 +690,9 @@ func UserErrNotFound(mm ...*userActionProps) *errors.Error { // UserErrInvalidID returns "system:user.invalidID" as *errors.Error // +// // This function is auto-generated. +// func UserErrInvalidID(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -698,7 +724,9 @@ func UserErrInvalidID(mm ...*userActionProps) *errors.Error { // UserErrInvalidHandle returns "system:user.invalidHandle" as *errors.Error // +// // This function is auto-generated. +// func UserErrInvalidHandle(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -730,7 +758,9 @@ func UserErrInvalidHandle(mm ...*userActionProps) *errors.Error { // UserErrInvalidEmail returns "system:user.invalidEmail" as *errors.Error // +// // This function is auto-generated. +// func UserErrInvalidEmail(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -762,7 +792,9 @@ func UserErrInvalidEmail(mm ...*userActionProps) *errors.Error { // UserErrNotAllowedToRead returns "system:user.notAllowedToRead" as *errors.Error // +// // This function is auto-generated. +// func UserErrNotAllowedToRead(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -796,7 +828,9 @@ func UserErrNotAllowedToRead(mm ...*userActionProps) *errors.Error { // UserErrNotAllowedToSearch returns "system:user.notAllowedToSearch" as *errors.Error // +// // This function is auto-generated. +// func UserErrNotAllowedToSearch(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -830,7 +864,9 @@ func UserErrNotAllowedToSearch(mm ...*userActionProps) *errors.Error { // UserErrNotAllowedToListUsers returns "system:user.notAllowedToListUsers" as *errors.Error // +// // This function is auto-generated. +// func UserErrNotAllowedToListUsers(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -864,7 +900,9 @@ func UserErrNotAllowedToListUsers(mm ...*userActionProps) *errors.Error { // UserErrNotAllowedToCreate returns "system:user.notAllowedToCreate" as *errors.Error // +// // This function is auto-generated. +// func UserErrNotAllowedToCreate(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -898,7 +936,9 @@ func UserErrNotAllowedToCreate(mm ...*userActionProps) *errors.Error { // UserErrNotAllowedToCreateSystem returns "system:user.notAllowedToCreateSystem" as *errors.Error // +// // This function is auto-generated. +// func UserErrNotAllowedToCreateSystem(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -932,7 +972,9 @@ func UserErrNotAllowedToCreateSystem(mm ...*userActionProps) *errors.Error { // UserErrNotAllowedToUpdate returns "system:user.notAllowedToUpdate" as *errors.Error // +// // This function is auto-generated. +// func UserErrNotAllowedToUpdate(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -966,7 +1008,9 @@ func UserErrNotAllowedToUpdate(mm ...*userActionProps) *errors.Error { // UserErrNotAllowedToUpdateSystem returns "system:user.notAllowedToUpdateSystem" as *errors.Error // +// // This function is auto-generated. +// func UserErrNotAllowedToUpdateSystem(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -1000,7 +1044,9 @@ func UserErrNotAllowedToUpdateSystem(mm ...*userActionProps) *errors.Error { // UserErrNotAllowedToDelete returns "system:user.notAllowedToDelete" as *errors.Error // +// // This function is auto-generated. +// func UserErrNotAllowedToDelete(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -1034,7 +1080,9 @@ func UserErrNotAllowedToDelete(mm ...*userActionProps) *errors.Error { // UserErrNotAllowedToUndelete returns "system:user.notAllowedToUndelete" as *errors.Error // +// // This function is auto-generated. +// func UserErrNotAllowedToUndelete(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -1068,7 +1116,9 @@ func UserErrNotAllowedToUndelete(mm ...*userActionProps) *errors.Error { // UserErrNotAllowedToSuspend returns "system:user.notAllowedToSuspend" as *errors.Error // +// // This function is auto-generated. +// func UserErrNotAllowedToSuspend(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -1102,7 +1152,9 @@ func UserErrNotAllowedToSuspend(mm ...*userActionProps) *errors.Error { // UserErrNotAllowedToUnsuspend returns "system:user.notAllowedToUnsuspend" as *errors.Error // +// // This function is auto-generated. +// func UserErrNotAllowedToUnsuspend(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -1136,7 +1188,9 @@ func UserErrNotAllowedToUnsuspend(mm ...*userActionProps) *errors.Error { // UserErrHandleNotUnique returns "system:user.handleNotUnique" as *errors.Error // +// // This function is auto-generated. +// func UserErrHandleNotUnique(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -1170,7 +1224,9 @@ func UserErrHandleNotUnique(mm ...*userActionProps) *errors.Error { // UserErrEmailNotUnique returns "system:user.emailNotUnique" as *errors.Error // +// // This function is auto-generated. +// func UserErrEmailNotUnique(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -1204,7 +1260,9 @@ func UserErrEmailNotUnique(mm ...*userActionProps) *errors.Error { // UserErrUsernameNotUnique returns "system:user.usernameNotUnique" as *errors.Error // +// // This function is auto-generated. +// func UserErrUsernameNotUnique(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -1238,7 +1296,9 @@ func UserErrUsernameNotUnique(mm ...*userActionProps) *errors.Error { // UserErrPasswordNotSecure returns "system:user.passwordNotSecure" as *errors.Error // +// // This function is auto-generated. +// func UserErrPasswordNotSecure(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -1270,7 +1330,9 @@ func UserErrPasswordNotSecure(mm ...*userActionProps) *errors.Error { // UserErrMaxUserLimitReached returns "system:user.maxUserLimitReached" as *errors.Error // +// // This function is auto-generated. +// func UserErrMaxUserLimitReached(mm ...*userActionProps) *errors.Error { var p = &userActionProps{} if len(mm) > 0 { @@ -1342,6 +1404,7 @@ func UserErrNotAllowedToDeleteAvatar(mm ...*userActionProps) *errors.Error { // It will wrap unrecognized/internal errors with generic errors. // // This function is auto-generated. +// func (svc user) recordAction(ctx context.Context, props *userActionProps, actionFn func(...*userActionProps) *userAction, err error) error { if svc.actionlog == nil || actionFn == nil { // action log disabled or no action fn passed, return error as-is