Refactor data-privacy endpoints

Moved DataPrivacyRequest and DataPrivacyRequestComment under DataPrivacy route
This commit is contained in:
Vivek Patel
2023-01-25 22:25:48 +05:30
parent f45ae3c6bc
commit 83f95ed5da
75 changed files with 2798 additions and 1466 deletions
+9 -12
View File
@@ -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",
+6
View File
@@ -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()
+12 -16
View File
@@ -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",
+39 -52
View File
@@ -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",
+24 -32
View File
@@ -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",
+33 -44
View File
@@ -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",
+3 -4
View File
@@ -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",
+59 -68
View File
@@ -2169,78 +2169,11 @@ endpoints:
- { type: string, name: lang, required: true, title: Language }
- { type: string, name: application, required: true, title: Application name }
- title: Data Privacy Request
entrypoint: dataPrivacyRequest
imports:
- github.com/cortezaproject/corteza/server/system/types
path: "/data-privacy/requests"
apis:
- name: list
method: GET
title: List data privacy requests
path: "/"
parameters:
get:
- { name: requestedBy, type: "[]string", title: "Filter by user ID" }
- { name: query, type: "string", title: "Filter requests" }
- { name: kind, type: "[]string", title: "Filter by kind: correct, delete, export" }
- { name: status, type: "[]string", title: "Filter by status: pending, cancel, approve, reject" }
- { name: limit, type: "uint", title: "Limit" }
- { name: pageCursor, type: "string", title: "Page cursor" }
- { name: sort, type: "string", title: "Sort items" }
- name: create
method: POST
title: Create data privacy request
path: "/"
parameters:
post:
- { name: kind, type: "string", title: "Request Kind", required: true }
- { name: payload, type: "types.DataPrivacyRequestPayloadSet", title: Request, required: false, parser: types.ParseDataPrivacyRequestPayload }
- name: update status
method: PATCH
title: Update data privacy request status
path: "/{requestID}/status/{status}"
parameters:
path:
- { name: requestID, type: "uint64", title: "ID", required: true }
- { name: status, type: "string", title: "Request Status", required: true }
- name: read
method: GET
title: Get details about specific request
path: "/{requestID}"
parameters:
path:
- { name: requestID, type: "uint64", title: "Request ID", required: true }
- title: Data Privacy Request Comment
entrypoint: dataPrivacyRequestComment
path: "/data-privacy/requests/{requestID}/comments"
parameters:
path:
- { name: requestID, type: "uint64", title: "Request ID", required: true }
apis:
- name: list
method: GET
title: List data privacy request comments
path: "/"
parameters:
get:
- { name: limit, type: "uint", title: "Limit" }
- { name: pageCursor, type: "string", title: "Page cursor" }
- { name: sort, type: "string", title: "Sort items" }
- name: create
method: POST
title: Create data privacy request comment
path: "/"
parameters:
post:
- { name: comment, type: "string", title: "Comment description", required: true }
- title: Data Privacy
entrypoint: dataPrivacy
imports:
- github.com/cortezaproject/corteza/server/pkg/filter
- github.com/cortezaproject/corteza/server/system/types
path: "/data-privacy"
apis:
- name: connection list
@@ -2266,6 +2199,64 @@ endpoints:
title: Exclude (0, default), include (1) or return only (2) deleted connections
type: filter.State
- name: request list
method: GET
title: List data privacy requests
path: "/requests/"
parameters:
get:
- { name: requestedBy, type: "[]string", title: "Filter by user ID" }
- { name: query, type: "string", title: "Filter requests" }
- { name: kind, type: "[]string", title: "Filter by kind: correct, delete, export" }
- { name: status, type: "[]string", title: "Filter by status: pending, cancel, approve, reject" }
- { name: limit, type: "uint", title: "Limit" }
- { name: pageCursor, type: "string", title: "Page cursor" }
- { name: sort, type: "string", title: "Sort items" }
- name: request create
method: POST
title: Create data privacy request
path: "/requests/"
parameters:
post:
- { name: kind, type: "string", title: "Request Kind", required: true }
- { name: payload, type: "types.DataPrivacyRequestPayloadSet", title: Request, required: false, parser: types.ParseDataPrivacyRequestPayload }
- name: request read
method: GET
title: Get details about specific request
path: "/requests/{requestID}"
parameters:
path:
- { name: requestID, type: "uint64", title: "Request ID", required: true }
- name: request update status
method: PATCH
title: Update data privacy request status
path: "/requests/{requestID}/status/{status}"
parameters:
path:
- { name: requestID, type: "uint64", title: "ID", required: true }
- { name: status, type: "string", title: "Request Status", required: true }
- name: request comment list
method: GET
title: List data privacy request comments
path: "/requests/{requestID}/comments/"
parameters:
path:
- { name: requestID, type: "uint64", title: "Request ID", required: true }
get:
- { name: limit, type: "uint", title: "Limit" }
- { name: pageCursor, type: "string", title: "Page cursor" }
- { name: sort, type: "string", title: "Sort items" }
- name: request comment create
method: POST
title: Create data privacy request comment
path: "/requests/{requestID}/comments/"
parameters:
path:
- { name: requestID, type: "uint64", title: "Request ID", required: true }
post:
- { name: comment, type: "string", title: "Comment description", required: true }
- title: SMTP Configuration Checker
entrypoint: smtpConfigurationChecker
path: "/smtp"
+99
View File
@@ -2,6 +2,7 @@ package rest
import (
"context"
"github.com/cortezaproject/corteza/server/pkg/filter"
"github.com/cortezaproject/corteza/server/pkg/payload"
"github.com/cortezaproject/corteza/server/system/rest/request"
@@ -61,3 +62,101 @@ func (ctrl DataPrivacy) makeFilterConnectionPayload(_ context.Context, rr types.
return &privacyConnectionSetPayload{Filter: f, Set: rr}, nil
}
func (ctrl DataPrivacy) RequestList(ctx context.Context, r *request.DataPrivacyRequestList) (interface{}, error) {
var (
err error
f = types.DataPrivacyRequestFilter{
RequestedBy: payload.ParseUint64s(r.RequestedBy),
Query: r.Query,
Kind: r.Kind,
Status: r.Status,
}
)
if f.Paging, err = filter.NewPaging(r.Limit, r.PageCursor); err != nil {
return nil, err
}
if f.Sorting, err = filter.NewSorting(r.Sort); err != nil {
return nil, err
}
set, f, err := ctrl.privacy.FindRequests(ctx, f)
return ctrl.makeFilterRequestPayload(ctx, set, f, err)
}
func (ctrl DataPrivacy) makeFilterRequestPayload(_ context.Context, rr types.DataPrivacyRequestSet, f types.DataPrivacyRequestFilter, err error) (*dataPrivacyRequestSetPayload, error) {
if err != nil {
return nil, err
}
if len(rr) == 0 {
rr = make([]*types.DataPrivacyRequest, 0)
}
return &dataPrivacyRequestSetPayload{Filter: f, Set: rr}, nil
}
func (ctrl DataPrivacy) RequestCreate(ctx context.Context, r *request.DataPrivacyRequestCreate) (interface{}, error) {
req := &types.DataPrivacyRequest{
Kind: types.CastToRequestKind(r.Kind),
Payload: r.Payload,
}
return ctrl.privacy.CreateRequest(ctx, req)
}
func (ctrl DataPrivacy) RequestRead(ctx context.Context, r *request.DataPrivacyRequestRead) (interface{}, error) {
return ctrl.privacy.FindRequestByID(ctx, r.RequestID)
}
func (ctrl DataPrivacy) RequestUpdateStatus(ctx context.Context, r *request.DataPrivacyRequestUpdateStatus) (interface{}, error) {
req := &types.DataPrivacyRequest{
ID: r.RequestID,
Status: types.CastToRequestStatus(r.Status),
}
return ctrl.privacy.UpdateRequestStatus(ctx, req)
}
func (ctrl DataPrivacy) RequestCommentList(ctx context.Context, r *request.DataPrivacyRequestCommentList) (interface{}, error) {
var (
err error
f = types.DataPrivacyRequestCommentFilter{
RequestID: []uint64{r.RequestID},
}
)
if f.Paging, err = filter.NewPaging(r.Limit, r.PageCursor); err != nil {
return nil, err
}
if f.Sorting, err = filter.NewSorting(r.Sort); err != nil {
return nil, err
}
set, f, err := ctrl.privacy.FindRequestComments(ctx, f)
return ctrl.makeFilterRequestCommentPayload(ctx, set, f, err)
}
func (ctrl DataPrivacy) makeFilterRequestCommentPayload(_ context.Context, rr types.DataPrivacyRequestCommentSet, f types.DataPrivacyRequestCommentFilter, err error) (*dataPrivacyRequestCommentSetPayload, error) {
if err != nil {
return nil, err
}
if len(rr) == 0 {
rr = make([]*types.DataPrivacyRequestComment, 0)
}
return &dataPrivacyRequestCommentSetPayload{Filter: f, Set: rr}, nil
}
func (ctrl DataPrivacy) RequestCommentCreate(ctx context.Context, r *request.DataPrivacyRequestCommentCreate) (interface{}, error) {
req := &types.DataPrivacyRequestComment{
RequestID: r.RequestID,
Comment: r.Comment,
}
return ctrl.privacy.CreateRequestComment(ctx, req)
}
+96 -99
View File
@@ -3,9 +3,6 @@ package rest
import (
"context"
"github.com/cortezaproject/corteza/server/pkg/filter"
"github.com/cortezaproject/corteza/server/pkg/payload"
"github.com/cortezaproject/corteza/server/system/rest/request"
"github.com/cortezaproject/corteza/server/system/service"
"github.com/cortezaproject/corteza/server/system/types"
)
@@ -43,62 +40,62 @@ func (DataPrivacyRequest) New() *DataPrivacyRequest {
}
}
func (ctrl DataPrivacyRequest) List(ctx context.Context, r *request.DataPrivacyRequestList) (interface{}, error) {
var (
err error
f = types.DataPrivacyRequestFilter{
RequestedBy: payload.ParseUint64s(r.RequestedBy),
Query: r.Query,
Kind: r.Kind,
Status: r.Status,
}
)
if f.Paging, err = filter.NewPaging(r.Limit, r.PageCursor); err != nil {
return nil, err
}
if f.Sorting, err = filter.NewSorting(r.Sort); err != nil {
return nil, err
}
set, f, err := ctrl.dataPrivacy.FindRequests(ctx, f)
return ctrl.makeFilterPayload(ctx, set, f, err)
}
func (ctrl DataPrivacyRequest) makeFilterPayload(_ context.Context, rr types.DataPrivacyRequestSet, f types.DataPrivacyRequestFilter, err error) (*dataPrivacyRequestSetPayload, error) {
if err != nil {
return nil, err
}
if len(rr) == 0 {
rr = make([]*types.DataPrivacyRequest, 0)
}
return &dataPrivacyRequestSetPayload{Filter: f, Set: rr}, nil
}
func (ctrl DataPrivacyRequest) Create(ctx context.Context, r *request.DataPrivacyRequestCreate) (interface{}, error) {
req := &types.DataPrivacyRequest{
Kind: types.CastToRequestKind(r.Kind),
Payload: r.Payload,
}
return ctrl.dataPrivacy.CreateRequest(ctx, req)
}
func (ctrl DataPrivacyRequest) UpdateStatus(ctx context.Context, r *request.DataPrivacyRequestUpdateStatus) (interface{}, error) {
req := &types.DataPrivacyRequest{
ID: r.RequestID,
Status: types.CastToRequestStatus(r.Status),
}
return ctrl.dataPrivacy.UpdateRequestStatus(ctx, req)
}
func (ctrl DataPrivacyRequest) Read(ctx context.Context, r *request.DataPrivacyRequestRead) (interface{}, error) {
return ctrl.dataPrivacy.FindRequestByID(ctx, r.RequestID)
}
// func (ctrl DataPrivacyRequest) List(ctx context.Context, r *request.DataPrivacyRequestList) (interface{}, error) {
// var (
// err error
// f = types.DataPrivacyRequestFilter{
// RequestedBy: payload.ParseUint64s(r.RequestedBy),
// Query: r.Query,
// Kind: r.Kind,
// Status: r.Status,
// }
// )
//
// if f.Paging, err = filter.NewPaging(r.Limit, r.PageCursor); err != nil {
// return nil, err
// }
//
// if f.Sorting, err = filter.NewSorting(r.Sort); err != nil {
// return nil, err
// }
//
// set, f, err := ctrl.dataPrivacy.FindRequests(ctx, f)
// return ctrl.makeFilterPayload(ctx, set, f, err)
// }
//
// func (ctrl DataPrivacyRequest) makeFilterPayload(_ context.Context, rr types.DataPrivacyRequestSet, f types.DataPrivacyRequestFilter, err error) (*dataPrivacyRequestSetPayload, error) {
// if err != nil {
// return nil, err
// }
//
// if len(rr) == 0 {
// rr = make([]*types.DataPrivacyRequest, 0)
// }
//
// return &dataPrivacyRequestSetPayload{Filter: f, Set: rr}, nil
// }
//
// func (ctrl DataPrivacyRequest) Create(ctx context.Context, r *request.DataPrivacyRequestCreate) (interface{}, error) {
// req := &types.DataPrivacyRequest{
// Kind: types.CastToRequestKind(r.Kind),
// Payload: r.Payload,
// }
//
// return ctrl.dataPrivacy.CreateRequest(ctx, req)
// }
//
// func (ctrl DataPrivacyRequest) UpdateStatus(ctx context.Context, r *request.DataPrivacyRequestUpdateStatus) (interface{}, error) {
// req := &types.DataPrivacyRequest{
// ID: r.RequestID,
// Status: types.CastToRequestStatus(r.Status),
// }
//
// return ctrl.dataPrivacy.UpdateRequestStatus(ctx, req)
// }
//
// func (ctrl DataPrivacyRequest) Read(ctx context.Context, r *request.DataPrivacyRequestRead) (interface{}, error) {
// return ctrl.dataPrivacy.FindRequestByID(ctx, r.RequestID)
// }
func (DataPrivacyRequestComment) New() *DataPrivacyRequestComment {
return &DataPrivacyRequestComment{
@@ -107,43 +104,43 @@ func (DataPrivacyRequestComment) New() *DataPrivacyRequestComment {
}
}
func (ctrl DataPrivacyRequestComment) List(ctx context.Context, r *request.DataPrivacyRequestCommentList) (interface{}, error) {
var (
err error
f = types.DataPrivacyRequestCommentFilter{
RequestID: []uint64{r.RequestID},
}
)
if f.Paging, err = filter.NewPaging(r.Limit, r.PageCursor); err != nil {
return nil, err
}
if f.Sorting, err = filter.NewSorting(r.Sort); err != nil {
return nil, err
}
set, f, err := ctrl.dataPrivacy.FindRequestComments(ctx, f)
return ctrl.makeFilterPayload(ctx, set, f, err)
}
func (ctrl DataPrivacyRequestComment) makeFilterPayload(_ context.Context, rr types.DataPrivacyRequestCommentSet, f types.DataPrivacyRequestCommentFilter, err error) (*dataPrivacyRequestCommentSetPayload, error) {
if err != nil {
return nil, err
}
if len(rr) == 0 {
rr = make([]*types.DataPrivacyRequestComment, 0)
}
return &dataPrivacyRequestCommentSetPayload{Filter: f, Set: rr}, nil
}
func (ctrl DataPrivacyRequestComment) Create(ctx context.Context, r *request.DataPrivacyRequestCommentCreate) (interface{}, error) {
req := &types.DataPrivacyRequestComment{
RequestID: r.RequestID,
Comment: r.Comment,
}
return ctrl.dataPrivacy.CreateRequestComment(ctx, req)
}
// func (ctrl DataPrivacyRequestComment) List(ctx context.Context, r *request.DataPrivacyRequestCommentList) (interface{}, error) {
// var (
// err error
// f = types.DataPrivacyRequestCommentFilter{
// RequestID: []uint64{r.RequestID},
// }
// )
//
// if f.Paging, err = filter.NewPaging(r.Limit, r.PageCursor); err != nil {
// return nil, err
// }
//
// if f.Sorting, err = filter.NewSorting(r.Sort); err != nil {
// return nil, err
// }
//
// set, f, err := ctrl.dataPrivacy.FindRequestComments(ctx, f)
// return ctrl.makeFilterPayload(ctx, set, f, err)
// }
//
// func (ctrl DataPrivacyRequestComment) makeFilterPayload(_ context.Context, rr types.DataPrivacyRequestCommentSet, f types.DataPrivacyRequestCommentFilter, err error) (*dataPrivacyRequestCommentSetPayload, error) {
// if err != nil {
// return nil, err
// }
//
// if len(rr) == 0 {
// rr = make([]*types.DataPrivacyRequestComment, 0)
// }
//
// return &dataPrivacyRequestCommentSetPayload{Filter: f, Set: rr}, nil
// }
//
// func (ctrl DataPrivacyRequestComment) Create(ctx context.Context, r *request.DataPrivacyRequestCommentCreate) (interface{}, error) {
// req := &types.DataPrivacyRequestComment{
// RequestID: r.RequestID,
// Comment: r.Comment,
// }
//
// return ctrl.dataPrivacy.CreateRequestComment(ctx, req)
// }
+115 -1
View File
@@ -20,11 +20,23 @@ type (
// Internal API interface
DataPrivacyAPI interface {
ConnectionList(context.Context, *request.DataPrivacyConnectionList) (interface{}, error)
RequestList(context.Context, *request.DataPrivacyRequestList) (interface{}, error)
RequestCreate(context.Context, *request.DataPrivacyRequestCreate) (interface{}, error)
RequestRead(context.Context, *request.DataPrivacyRequestRead) (interface{}, error)
RequestUpdateStatus(context.Context, *request.DataPrivacyRequestUpdateStatus) (interface{}, error)
RequestCommentList(context.Context, *request.DataPrivacyRequestCommentList) (interface{}, error)
RequestCommentCreate(context.Context, *request.DataPrivacyRequestCommentCreate) (interface{}, error)
}
// HTTP API interface
DataPrivacy struct {
ConnectionList func(http.ResponseWriter, *http.Request)
ConnectionList func(http.ResponseWriter, *http.Request)
RequestList func(http.ResponseWriter, *http.Request)
RequestCreate func(http.ResponseWriter, *http.Request)
RequestRead func(http.ResponseWriter, *http.Request)
RequestUpdateStatus func(http.ResponseWriter, *http.Request)
RequestCommentList func(http.ResponseWriter, *http.Request)
RequestCommentCreate func(http.ResponseWriter, *http.Request)
}
)
@@ -44,6 +56,102 @@ func NewDataPrivacy(h DataPrivacyAPI) *DataPrivacy {
return
}
api.Send(w, r, value)
},
RequestList: func(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
params := request.NewDataPrivacyRequestList()
if err := params.Fill(r); err != nil {
api.Send(w, r, err)
return
}
value, err := h.RequestList(r.Context(), params)
if err != nil {
api.Send(w, r, err)
return
}
api.Send(w, r, value)
},
RequestCreate: func(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
params := request.NewDataPrivacyRequestCreate()
if err := params.Fill(r); err != nil {
api.Send(w, r, err)
return
}
value, err := h.RequestCreate(r.Context(), params)
if err != nil {
api.Send(w, r, err)
return
}
api.Send(w, r, value)
},
RequestRead: func(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
params := request.NewDataPrivacyRequestRead()
if err := params.Fill(r); err != nil {
api.Send(w, r, err)
return
}
value, err := h.RequestRead(r.Context(), params)
if err != nil {
api.Send(w, r, err)
return
}
api.Send(w, r, value)
},
RequestUpdateStatus: func(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
params := request.NewDataPrivacyRequestUpdateStatus()
if err := params.Fill(r); err != nil {
api.Send(w, r, err)
return
}
value, err := h.RequestUpdateStatus(r.Context(), params)
if err != nil {
api.Send(w, r, err)
return
}
api.Send(w, r, value)
},
RequestCommentList: func(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
params := request.NewDataPrivacyRequestCommentList()
if err := params.Fill(r); err != nil {
api.Send(w, r, err)
return
}
value, err := h.RequestCommentList(r.Context(), params)
if err != nil {
api.Send(w, r, err)
return
}
api.Send(w, r, value)
},
RequestCommentCreate: func(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
params := request.NewDataPrivacyRequestCommentCreate()
if err := params.Fill(r); err != nil {
api.Send(w, r, err)
return
}
value, err := h.RequestCommentCreate(r.Context(), params)
if err != nil {
api.Send(w, r, err)
return
}
api.Send(w, r, value)
},
}
@@ -53,5 +161,11 @@ func (h DataPrivacy) MountRoutes(r chi.Router, middlewares ...func(http.Handler)
r.Group(func(r chi.Router) {
r.Use(middlewares...)
r.Get("/data-privacy/connection/", h.ConnectionList)
r.Get("/data-privacy/requests/", h.RequestList)
r.Post("/data-privacy/requests/", h.RequestCreate)
r.Get("/data-privacy/requests/{requestID}", h.RequestRead)
r.Patch("/data-privacy/requests/{requestID}/status/{status}", h.RequestUpdateStatus)
r.Get("/data-privacy/requests/{requestID}/comments/", h.RequestCommentList)
r.Post("/data-privacy/requests/{requestID}/comments/", h.RequestCommentCreate)
})
}
@@ -1,114 +0,0 @@
package handlers
// This file is auto-generated.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// Definitions file that controls how this file is generated:
//
import (
"context"
"github.com/cortezaproject/corteza/server/pkg/api"
"github.com/cortezaproject/corteza/server/system/rest/request"
"github.com/go-chi/chi/v5"
"net/http"
)
type (
// Internal API interface
DataPrivacyRequestAPI interface {
List(context.Context, *request.DataPrivacyRequestList) (interface{}, error)
Create(context.Context, *request.DataPrivacyRequestCreate) (interface{}, error)
UpdateStatus(context.Context, *request.DataPrivacyRequestUpdateStatus) (interface{}, error)
Read(context.Context, *request.DataPrivacyRequestRead) (interface{}, error)
}
// HTTP API interface
DataPrivacyRequest struct {
List func(http.ResponseWriter, *http.Request)
Create func(http.ResponseWriter, *http.Request)
UpdateStatus func(http.ResponseWriter, *http.Request)
Read func(http.ResponseWriter, *http.Request)
}
)
func NewDataPrivacyRequest(h DataPrivacyRequestAPI) *DataPrivacyRequest {
return &DataPrivacyRequest{
List: func(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
params := request.NewDataPrivacyRequestList()
if err := params.Fill(r); err != nil {
api.Send(w, r, err)
return
}
value, err := h.List(r.Context(), params)
if err != nil {
api.Send(w, r, err)
return
}
api.Send(w, r, value)
},
Create: func(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
params := request.NewDataPrivacyRequestCreate()
if err := params.Fill(r); err != nil {
api.Send(w, r, err)
return
}
value, err := h.Create(r.Context(), params)
if err != nil {
api.Send(w, r, err)
return
}
api.Send(w, r, value)
},
UpdateStatus: func(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
params := request.NewDataPrivacyRequestUpdateStatus()
if err := params.Fill(r); err != nil {
api.Send(w, r, err)
return
}
value, err := h.UpdateStatus(r.Context(), params)
if err != nil {
api.Send(w, r, err)
return
}
api.Send(w, r, value)
},
Read: func(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
params := request.NewDataPrivacyRequestRead()
if err := params.Fill(r); err != nil {
api.Send(w, r, err)
return
}
value, err := h.Read(r.Context(), params)
if err != nil {
api.Send(w, r, err)
return
}
api.Send(w, r, value)
},
}
}
func (h DataPrivacyRequest) MountRoutes(r chi.Router, middlewares ...func(http.Handler) http.Handler) {
r.Group(func(r chi.Router) {
r.Use(middlewares...)
r.Get("/data-privacy/requests/", h.List)
r.Post("/data-privacy/requests/", h.Create)
r.Patch("/data-privacy/requests/{requestID}/status/{status}", h.UpdateStatus)
r.Get("/data-privacy/requests/{requestID}", h.Read)
})
}
@@ -1,76 +0,0 @@
package handlers
// This file is auto-generated.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// Definitions file that controls how this file is generated:
//
import (
"context"
"github.com/cortezaproject/corteza/server/pkg/api"
"github.com/cortezaproject/corteza/server/system/rest/request"
"github.com/go-chi/chi/v5"
"net/http"
)
type (
// Internal API interface
DataPrivacyRequestCommentAPI interface {
List(context.Context, *request.DataPrivacyRequestCommentList) (interface{}, error)
Create(context.Context, *request.DataPrivacyRequestCommentCreate) (interface{}, error)
}
// HTTP API interface
DataPrivacyRequestComment struct {
List func(http.ResponseWriter, *http.Request)
Create func(http.ResponseWriter, *http.Request)
}
)
func NewDataPrivacyRequestComment(h DataPrivacyRequestCommentAPI) *DataPrivacyRequestComment {
return &DataPrivacyRequestComment{
List: func(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
params := request.NewDataPrivacyRequestCommentList()
if err := params.Fill(r); err != nil {
api.Send(w, r, err)
return
}
value, err := h.List(r.Context(), params)
if err != nil {
api.Send(w, r, err)
return
}
api.Send(w, r, value)
},
Create: func(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
params := request.NewDataPrivacyRequestCommentCreate()
if err := params.Fill(r); err != nil {
api.Send(w, r, err)
return
}
value, err := h.Create(r.Context(), params)
if err != nil {
api.Send(w, r, err)
return
}
api.Send(w, r, value)
},
}
}
func (h DataPrivacyRequestComment) MountRoutes(r chi.Router, middlewares ...func(http.Handler) http.Handler) {
r.Group(func(r chi.Router) {
r.Use(middlewares...)
r.Get("/data-privacy/requests/{requestID}/comments/", h.List)
r.Post("/data-privacy/requests/{requestID}/comments/", h.Create)
})
}
+562
View File
@@ -13,6 +13,7 @@ import (
"fmt"
"github.com/cortezaproject/corteza/server/pkg/filter"
"github.com/cortezaproject/corteza/server/pkg/payload"
"github.com/cortezaproject/corteza/server/system/types"
"github.com/go-chi/chi/v5"
"io"
"mime/multipart"
@@ -55,6 +56,108 @@ type (
// Exclude (0, default), include (1) or return only (2) deleted connections
Deleted filter.State
}
DataPrivacyRequestList struct {
// RequestedBy GET parameter
//
// Filter by user ID
RequestedBy []string
// Query GET parameter
//
// Filter requests
Query string
// Kind GET parameter
//
// Filter by kind: correct, delete, export
Kind []string
// Status GET parameter
//
// Filter by status: pending, cancel, approve, reject
Status []string
// Limit GET parameter
//
// Limit
Limit uint
// PageCursor GET parameter
//
// Page cursor
PageCursor string
// Sort GET parameter
//
// Sort items
Sort string
}
DataPrivacyRequestCreate struct {
// Kind POST parameter
//
// Request Kind
Kind string
// Payload POST parameter
//
// Request
Payload types.DataPrivacyRequestPayloadSet
}
DataPrivacyRequestRead struct {
// RequestID PATH parameter
//
// Request ID
RequestID uint64 `json:",string"`
}
DataPrivacyRequestUpdateStatus struct {
// RequestID PATH parameter
//
// ID
RequestID uint64 `json:",string"`
// Status PATH parameter
//
// Request Status
Status string
}
DataPrivacyRequestCommentList struct {
// RequestID PATH parameter
//
// Request ID
RequestID uint64 `json:",string"`
// Limit GET parameter
//
// Limit
Limit uint
// PageCursor GET parameter
//
// Page cursor
PageCursor string
// Sort GET parameter
//
// Sort items
Sort string
}
DataPrivacyRequestCommentCreate struct {
// RequestID PATH parameter
//
// Request ID
RequestID uint64 `json:",string"`
// Comment POST parameter
//
// Comment description
Comment string
}
)
// NewDataPrivacyConnectionList request
@@ -132,3 +235,462 @@ func (r *DataPrivacyConnectionList) Fill(req *http.Request) (err error) {
return err
}
// NewDataPrivacyRequestList request
func NewDataPrivacyRequestList() *DataPrivacyRequestList {
return &DataPrivacyRequestList{}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) Auditable() map[string]interface{} {
return map[string]interface{}{
"requestedBy": r.RequestedBy,
"query": r.Query,
"kind": r.Kind,
"status": r.Status,
"limit": r.Limit,
"pageCursor": r.PageCursor,
"sort": r.Sort,
}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) GetRequestedBy() []string {
return r.RequestedBy
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) GetQuery() string {
return r.Query
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) GetKind() []string {
return r.Kind
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) GetStatus() []string {
return r.Status
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) GetLimit() uint {
return r.Limit
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) GetPageCursor() string {
return r.PageCursor
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) GetSort() string {
return r.Sort
}
// Fill processes request and fills internal variables
func (r *DataPrivacyRequestList) Fill(req *http.Request) (err error) {
{
// GET params
tmp := req.URL.Query()
if val, ok := tmp["requestedBy[]"]; ok {
r.RequestedBy, err = val, nil
if err != nil {
return err
}
} else if val, ok := tmp["requestedBy"]; ok {
r.RequestedBy, err = val, nil
if err != nil {
return err
}
}
if val, ok := tmp["query"]; ok && len(val) > 0 {
r.Query, err = val[0], nil
if err != nil {
return err
}
}
if val, ok := tmp["kind[]"]; ok {
r.Kind, err = val, nil
if err != nil {
return err
}
} else if val, ok := tmp["kind"]; ok {
r.Kind, err = val, nil
if err != nil {
return err
}
}
if val, ok := tmp["status[]"]; ok {
r.Status, err = val, nil
if err != nil {
return err
}
} else if val, ok := tmp["status"]; ok {
r.Status, err = val, nil
if err != nil {
return err
}
}
if val, ok := tmp["limit"]; ok && len(val) > 0 {
r.Limit, err = payload.ParseUint(val[0]), nil
if err != nil {
return err
}
}
if val, ok := tmp["pageCursor"]; ok && len(val) > 0 {
r.PageCursor, err = val[0], nil
if err != nil {
return err
}
}
if val, ok := tmp["sort"]; ok && len(val) > 0 {
r.Sort, err = val[0], nil
if err != nil {
return err
}
}
}
return err
}
// NewDataPrivacyRequestCreate request
func NewDataPrivacyRequestCreate() *DataPrivacyRequestCreate {
return &DataPrivacyRequestCreate{}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCreate) Auditable() map[string]interface{} {
return map[string]interface{}{
"kind": r.Kind,
"payload": r.Payload,
}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCreate) GetKind() string {
return r.Kind
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCreate) GetPayload() types.DataPrivacyRequestPayloadSet {
return r.Payload
}
// Fill processes request and fills internal variables
func (r *DataPrivacyRequestCreate) 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 val, ok := req.MultipartForm.Value["kind"]; ok && len(val) > 0 {
r.Kind, err = val[0], nil
if err != nil {
return err
}
}
if val, ok := req.MultipartForm.Value["payload[]"]; ok {
r.Payload, err = types.ParseDataPrivacyRequestPayload(val)
if err != nil {
return err
}
} else if val, ok := req.MultipartForm.Value["payload"]; ok {
r.Payload, err = types.ParseDataPrivacyRequestPayload(val)
if err != nil {
return err
}
}
}
}
{
if err = req.ParseForm(); err != nil {
return err
}
// POST params
if val, ok := req.Form["kind"]; ok && len(val) > 0 {
r.Kind, err = val[0], nil
if err != nil {
return err
}
}
if val, ok := req.Form["payload[]"]; ok {
r.Payload, err = types.ParseDataPrivacyRequestPayload(val)
if err != nil {
return err
}
} else if val, ok := req.Form["payload"]; ok {
r.Payload, err = types.ParseDataPrivacyRequestPayload(val)
if err != nil {
return err
}
}
}
return err
}
// NewDataPrivacyRequestRead request
func NewDataPrivacyRequestRead() *DataPrivacyRequestRead {
return &DataPrivacyRequestRead{}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestRead) Auditable() map[string]interface{} {
return map[string]interface{}{
"requestID": r.RequestID,
}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestRead) GetRequestID() uint64 {
return r.RequestID
}
// Fill processes request and fills internal variables
func (r *DataPrivacyRequestRead) Fill(req *http.Request) (err error) {
{
var val string
// path params
val = chi.URLParam(req, "requestID")
r.RequestID, err = payload.ParseUint64(val), nil
if err != nil {
return err
}
}
return err
}
// NewDataPrivacyRequestUpdateStatus request
func NewDataPrivacyRequestUpdateStatus() *DataPrivacyRequestUpdateStatus {
return &DataPrivacyRequestUpdateStatus{}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestUpdateStatus) Auditable() map[string]interface{} {
return map[string]interface{}{
"requestID": r.RequestID,
"status": r.Status,
}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestUpdateStatus) GetRequestID() uint64 {
return r.RequestID
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestUpdateStatus) GetStatus() string {
return r.Status
}
// Fill processes request and fills internal variables
func (r *DataPrivacyRequestUpdateStatus) Fill(req *http.Request) (err error) {
{
var val string
// path params
val = chi.URLParam(req, "requestID")
r.RequestID, err = payload.ParseUint64(val), nil
if err != nil {
return err
}
val = chi.URLParam(req, "status")
r.Status, err = val, nil
if err != nil {
return err
}
}
return err
}
// NewDataPrivacyRequestCommentList request
func NewDataPrivacyRequestCommentList() *DataPrivacyRequestCommentList {
return &DataPrivacyRequestCommentList{}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentList) Auditable() map[string]interface{} {
return map[string]interface{}{
"requestID": r.RequestID,
"limit": r.Limit,
"pageCursor": r.PageCursor,
"sort": r.Sort,
}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentList) GetRequestID() uint64 {
return r.RequestID
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentList) GetLimit() uint {
return r.Limit
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentList) GetPageCursor() string {
return r.PageCursor
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentList) GetSort() string {
return r.Sort
}
// Fill processes request and fills internal variables
func (r *DataPrivacyRequestCommentList) Fill(req *http.Request) (err error) {
{
// GET params
tmp := req.URL.Query()
if val, ok := tmp["limit"]; ok && len(val) > 0 {
r.Limit, err = payload.ParseUint(val[0]), nil
if err != nil {
return err
}
}
if val, ok := tmp["pageCursor"]; ok && len(val) > 0 {
r.PageCursor, err = val[0], nil
if err != nil {
return err
}
}
if val, ok := tmp["sort"]; ok && len(val) > 0 {
r.Sort, err = val[0], nil
if err != nil {
return err
}
}
}
{
var val string
// path params
val = chi.URLParam(req, "requestID")
r.RequestID, err = payload.ParseUint64(val), nil
if err != nil {
return err
}
}
return err
}
// NewDataPrivacyRequestCommentCreate request
func NewDataPrivacyRequestCommentCreate() *DataPrivacyRequestCommentCreate {
return &DataPrivacyRequestCommentCreate{}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentCreate) Auditable() map[string]interface{} {
return map[string]interface{}{
"requestID": r.RequestID,
"comment": r.Comment,
}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentCreate) GetRequestID() uint64 {
return r.RequestID
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentCreate) GetComment() string {
return r.Comment
}
// Fill processes request and fills internal variables
func (r *DataPrivacyRequestCommentCreate) 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 val, ok := req.MultipartForm.Value["comment"]; ok && len(val) > 0 {
r.Comment, err = val[0], nil
if err != nil {
return err
}
}
}
}
{
if err = req.ParseForm(); err != nil {
return err
}
// POST params
if val, ok := req.Form["comment"]; ok && len(val) > 0 {
r.Comment, err = val[0], nil
if err != nil {
return err
}
}
}
{
var val string
// path params
val = chi.URLParam(req, "requestID")
r.RequestID, err = payload.ParseUint64(val), nil
if err != nil {
return err
}
}
return err
}
@@ -1,403 +0,0 @@
package request
// This file is auto-generated.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// Definitions file that controls how this file is generated:
//
import (
"encoding/json"
"fmt"
"github.com/cortezaproject/corteza/server/pkg/payload"
"github.com/cortezaproject/corteza/server/system/types"
"github.com/go-chi/chi/v5"
"io"
"mime/multipart"
"net/http"
"strings"
)
// dummy vars to prevent
// unused imports complain
var (
_ = chi.URLParam
_ = multipart.ErrMessageTooLarge
_ = payload.ParseUint64s
_ = strings.ToLower
_ = io.EOF
_ = fmt.Errorf
_ = json.NewEncoder
)
type (
// Internal API interface
DataPrivacyRequestList struct {
// RequestedBy GET parameter
//
// Filter by user ID
RequestedBy []string
// Query GET parameter
//
// Filter requests
Query string
// Kind GET parameter
//
// Filter by kind: correct, delete, export
Kind []string
// Status GET parameter
//
// Filter by status: pending, cancel, approve, reject
Status []string
// Limit GET parameter
//
// Limit
Limit uint
// PageCursor GET parameter
//
// Page cursor
PageCursor string
// Sort GET parameter
//
// Sort items
Sort string
}
DataPrivacyRequestCreate struct {
// Kind POST parameter
//
// Request Kind
Kind string
// Payload POST parameter
//
// Request
Payload types.DataPrivacyRequestPayloadSet
}
DataPrivacyRequestUpdateStatus struct {
// RequestID PATH parameter
//
// ID
RequestID uint64 `json:",string"`
// Status PATH parameter
//
// Request Status
Status string
}
DataPrivacyRequestRead struct {
// RequestID PATH parameter
//
// Request ID
RequestID uint64 `json:",string"`
}
)
// NewDataPrivacyRequestList request
func NewDataPrivacyRequestList() *DataPrivacyRequestList {
return &DataPrivacyRequestList{}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) Auditable() map[string]interface{} {
return map[string]interface{}{
"requestedBy": r.RequestedBy,
"query": r.Query,
"kind": r.Kind,
"status": r.Status,
"limit": r.Limit,
"pageCursor": r.PageCursor,
"sort": r.Sort,
}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) GetRequestedBy() []string {
return r.RequestedBy
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) GetQuery() string {
return r.Query
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) GetKind() []string {
return r.Kind
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) GetStatus() []string {
return r.Status
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) GetLimit() uint {
return r.Limit
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) GetPageCursor() string {
return r.PageCursor
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestList) GetSort() string {
return r.Sort
}
// Fill processes request and fills internal variables
func (r *DataPrivacyRequestList) Fill(req *http.Request) (err error) {
{
// GET params
tmp := req.URL.Query()
if val, ok := tmp["requestedBy[]"]; ok {
r.RequestedBy, err = val, nil
if err != nil {
return err
}
} else if val, ok := tmp["requestedBy"]; ok {
r.RequestedBy, err = val, nil
if err != nil {
return err
}
}
if val, ok := tmp["query"]; ok && len(val) > 0 {
r.Query, err = val[0], nil
if err != nil {
return err
}
}
if val, ok := tmp["kind[]"]; ok {
r.Kind, err = val, nil
if err != nil {
return err
}
} else if val, ok := tmp["kind"]; ok {
r.Kind, err = val, nil
if err != nil {
return err
}
}
if val, ok := tmp["status[]"]; ok {
r.Status, err = val, nil
if err != nil {
return err
}
} else if val, ok := tmp["status"]; ok {
r.Status, err = val, nil
if err != nil {
return err
}
}
if val, ok := tmp["limit"]; ok && len(val) > 0 {
r.Limit, err = payload.ParseUint(val[0]), nil
if err != nil {
return err
}
}
if val, ok := tmp["pageCursor"]; ok && len(val) > 0 {
r.PageCursor, err = val[0], nil
if err != nil {
return err
}
}
if val, ok := tmp["sort"]; ok && len(val) > 0 {
r.Sort, err = val[0], nil
if err != nil {
return err
}
}
}
return err
}
// NewDataPrivacyRequestCreate request
func NewDataPrivacyRequestCreate() *DataPrivacyRequestCreate {
return &DataPrivacyRequestCreate{}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCreate) Auditable() map[string]interface{} {
return map[string]interface{}{
"kind": r.Kind,
"payload": r.Payload,
}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCreate) GetKind() string {
return r.Kind
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCreate) GetPayload() types.DataPrivacyRequestPayloadSet {
return r.Payload
}
// Fill processes request and fills internal variables
func (r *DataPrivacyRequestCreate) 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 val, ok := req.MultipartForm.Value["kind"]; ok && len(val) > 0 {
r.Kind, err = val[0], nil
if err != nil {
return err
}
}
if val, ok := req.MultipartForm.Value["payload[]"]; ok {
r.Payload, err = types.ParseDataPrivacyRequestPayload(val)
if err != nil {
return err
}
} else if val, ok := req.MultipartForm.Value["payload"]; ok {
r.Payload, err = types.ParseDataPrivacyRequestPayload(val)
if err != nil {
return err
}
}
}
}
{
if err = req.ParseForm(); err != nil {
return err
}
// POST params
if val, ok := req.Form["kind"]; ok && len(val) > 0 {
r.Kind, err = val[0], nil
if err != nil {
return err
}
}
if val, ok := req.Form["payload[]"]; ok {
r.Payload, err = types.ParseDataPrivacyRequestPayload(val)
if err != nil {
return err
}
} else if val, ok := req.Form["payload"]; ok {
r.Payload, err = types.ParseDataPrivacyRequestPayload(val)
if err != nil {
return err
}
}
}
return err
}
// NewDataPrivacyRequestUpdateStatus request
func NewDataPrivacyRequestUpdateStatus() *DataPrivacyRequestUpdateStatus {
return &DataPrivacyRequestUpdateStatus{}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestUpdateStatus) Auditable() map[string]interface{} {
return map[string]interface{}{
"requestID": r.RequestID,
"status": r.Status,
}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestUpdateStatus) GetRequestID() uint64 {
return r.RequestID
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestUpdateStatus) GetStatus() string {
return r.Status
}
// Fill processes request and fills internal variables
func (r *DataPrivacyRequestUpdateStatus) Fill(req *http.Request) (err error) {
{
var val string
// path params
val = chi.URLParam(req, "requestID")
r.RequestID, err = payload.ParseUint64(val), nil
if err != nil {
return err
}
val = chi.URLParam(req, "status")
r.Status, err = val, nil
if err != nil {
return err
}
}
return err
}
// NewDataPrivacyRequestRead request
func NewDataPrivacyRequestRead() *DataPrivacyRequestRead {
return &DataPrivacyRequestRead{}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestRead) Auditable() map[string]interface{} {
return map[string]interface{}{
"requestID": r.RequestID,
}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestRead) GetRequestID() uint64 {
return r.RequestID
}
// Fill processes request and fills internal variables
func (r *DataPrivacyRequestRead) Fill(req *http.Request) (err error) {
{
var val string
// path params
val = chi.URLParam(req, "requestID")
r.RequestID, err = payload.ParseUint64(val), nil
if err != nil {
return err
}
}
return err
}
@@ -1,229 +0,0 @@
package request
// This file is auto-generated.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// Definitions file that controls how this file is generated:
//
import (
"encoding/json"
"fmt"
"github.com/cortezaproject/corteza/server/pkg/payload"
"github.com/go-chi/chi/v5"
"io"
"mime/multipart"
"net/http"
"strings"
)
// dummy vars to prevent
// unused imports complain
var (
_ = chi.URLParam
_ = multipart.ErrMessageTooLarge
_ = payload.ParseUint64s
_ = strings.ToLower
_ = io.EOF
_ = fmt.Errorf
_ = json.NewEncoder
)
type (
// Internal API interface
DataPrivacyRequestCommentList struct {
// RequestID PATH parameter
//
// Request ID
RequestID uint64 `json:",string"`
// Limit GET parameter
//
// Limit
Limit uint
// PageCursor GET parameter
//
// Page cursor
PageCursor string
// Sort GET parameter
//
// Sort items
Sort string
}
DataPrivacyRequestCommentCreate struct {
// RequestID PATH parameter
//
// Request ID
RequestID uint64 `json:",string"`
// Comment POST parameter
//
// Comment description
Comment string
}
)
// NewDataPrivacyRequestCommentList request
func NewDataPrivacyRequestCommentList() *DataPrivacyRequestCommentList {
return &DataPrivacyRequestCommentList{}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentList) Auditable() map[string]interface{} {
return map[string]interface{}{
"requestID": r.RequestID,
"limit": r.Limit,
"pageCursor": r.PageCursor,
"sort": r.Sort,
}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentList) GetRequestID() uint64 {
return r.RequestID
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentList) GetLimit() uint {
return r.Limit
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentList) GetPageCursor() string {
return r.PageCursor
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentList) GetSort() string {
return r.Sort
}
// Fill processes request and fills internal variables
func (r *DataPrivacyRequestCommentList) Fill(req *http.Request) (err error) {
{
// GET params
tmp := req.URL.Query()
if val, ok := tmp["limit"]; ok && len(val) > 0 {
r.Limit, err = payload.ParseUint(val[0]), nil
if err != nil {
return err
}
}
if val, ok := tmp["pageCursor"]; ok && len(val) > 0 {
r.PageCursor, err = val[0], nil
if err != nil {
return err
}
}
if val, ok := tmp["sort"]; ok && len(val) > 0 {
r.Sort, err = val[0], nil
if err != nil {
return err
}
}
}
{
var val string
// path params
val = chi.URLParam(req, "requestID")
r.RequestID, err = payload.ParseUint64(val), nil
if err != nil {
return err
}
}
return err
}
// NewDataPrivacyRequestCommentCreate request
func NewDataPrivacyRequestCommentCreate() *DataPrivacyRequestCommentCreate {
return &DataPrivacyRequestCommentCreate{}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentCreate) Auditable() map[string]interface{} {
return map[string]interface{}{
"requestID": r.RequestID,
"comment": r.Comment,
}
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentCreate) GetRequestID() uint64 {
return r.RequestID
}
// Auditable returns all auditable/loggable parameters
func (r DataPrivacyRequestCommentCreate) GetComment() string {
return r.Comment
}
// Fill processes request and fills internal variables
func (r *DataPrivacyRequestCommentCreate) 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 val, ok := req.MultipartForm.Value["comment"]; ok && len(val) > 0 {
r.Comment, err = val[0], nil
if err != nil {
return err
}
}
}
}
{
if err = req.ParseForm(); err != nil {
return err
}
// POST params
if val, ok := req.Form["comment"]; ok && len(val) > 0 {
r.Comment, err = val[0], nil
if err != nil {
return err
}
}
}
{
var val string
// path params
val = chi.URLParam(req, "requestID")
r.RequestID, err = payload.ParseUint64(val), nil
if err != nil {
return err
}
}
return err
}
-3
View File
@@ -48,9 +48,6 @@ func MountRoutes() func(r chi.Router) {
handlers.NewApigwFilter(ApigwFilter{}.New()).MountRoutes(r)
handlers.NewApigwProfiler(ApigwProfiler{}.New()).MountRoutes(r)
handlers.NewDataPrivacy(DataPrivacy{}.New()).MountRoutes(r)
// @todo move these two to dataPrivacy routes
handlers.NewDataPrivacyRequest(DataPrivacyRequest{}.New()).MountRoutes(r)
handlers.NewDataPrivacyRequestComment(DataPrivacyRequestComment{}.New()).MountRoutes(r)
handlers.NewSmtpConfigurationChecker(SmtpConfigurationChecker{}.New()).MountRoutes(r)
})
}
+10
View File
@@ -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
+24
View File
@@ -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
+40
View File
@@ -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
+39
View File
@@ -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
+32
View File
@@ -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 {
@@ -617,6 +648,7 @@ func AttachmentErrFailedToProcessImage(mm ...*attachmentActionProps) *errors.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
+93
View File
@@ -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
+44
View File
@@ -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 {
// 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 {
@@ -516,7 +539,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 {
@@ -548,7 +573,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 {
@@ -582,7 +609,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 {
@@ -616,7 +645,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 {
@@ -650,7 +681,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 {
@@ -684,7 +717,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 {
@@ -718,7 +753,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 {
@@ -752,7 +789,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 {
@@ -786,7 +825,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 {
@@ -820,7 +861,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 {
@@ -860,6 +903,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
+18
View File
@@ -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
+40
View File
@@ -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 {
// 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 {
@@ -468,7 +489,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 {
@@ -500,7 +523,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 {
@@ -532,7 +557,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 {
@@ -566,7 +593,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 {
@@ -600,7 +629,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 {
@@ -634,7 +665,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 {
@@ -668,7 +701,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 {
@@ -702,7 +737,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 {
@@ -736,7 +773,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 {
@@ -776,6 +815,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
@@ -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
// 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 {
@@ -468,7 +489,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 {
@@ -500,7 +523,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 {
@@ -566,7 +591,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 {
@@ -606,6 +633,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
@@ -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
+40
View File
@@ -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
+27
View File
@@ -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 {
// ReminderActionSnooze returns "system:reminder.snooze" action
//
// This function is auto-generated.
//
func ReminderActionSnooze(props ...*reminderActionProps) *reminderAction {
a := &reminderAction{
timestamp: time.Now(),
@@ -409,7 +423,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 {
@@ -443,7 +459,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 {
@@ -475,7 +493,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 {
@@ -507,7 +527,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 {
@@ -539,7 +561,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 {
@@ -571,7 +595,9 @@ func ReminderErrNotAllowedToDismiss(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 {
@@ -609,6 +635,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
+39
View File
@@ -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
@@ -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
+55
View File
@@ -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
+22
View File
@@ -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
+46
View File
@@ -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
+9
View File
@@ -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
+39
View File
@@ -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 {
// 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 {
@@ -547,7 +571,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 {
@@ -581,7 +607,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 {
@@ -615,7 +643,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 {
@@ -649,7 +679,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 {
@@ -683,7 +715,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 {
@@ -717,7 +751,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 {
@@ -751,7 +787,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 {
@@ -791,6 +829,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
+63
View File
@@ -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(),
@@ -543,7 +563,9 @@ func UserActionDeleteAuthSessions(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 {
@@ -577,7 +599,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 {
@@ -609,7 +633,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 {
@@ -641,7 +667,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 {
@@ -673,7 +701,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 {
@@ -705,7 +735,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 {
@@ -739,7 +771,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 {
@@ -773,7 +807,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 {
@@ -807,7 +843,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 {
@@ -841,7 +879,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 {
@@ -875,7 +915,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 {
@@ -909,7 +951,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 {
@@ -943,7 +987,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 {
@@ -977,7 +1023,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 {
@@ -1011,7 +1059,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 {
@@ -1045,7 +1095,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 {
@@ -1079,7 +1131,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 {
@@ -1113,7 +1167,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 {
@@ -1147,7 +1203,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 {
@@ -1181,7 +1239,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 {
@@ -1213,7 +1273,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 {
@@ -1251,6 +1313,7 @@ func UserErrMaxUserLimitReached(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