Versions in this module Expand all Collapse all v1 v1.0.1 Aug 15, 2024 Changes in this version + const AppIDKey + const AppNameKey + const AuditServiceName + const OrgIDKey + const OrgNameKey + const ProjectIDKey + const ProjectNameKey + const UserIDKey + func ContextEntry(ctx context.Context, key string, val interface{}) + func ContextEntryMap(ctx context.Context, kv map[string]interface{}) + func ContextOptions(ctx context.Context, opts ...Option) + func GetMethodFullName(method interface{}) string + func GetMethodName(method interface{}) string + type Auditor interface + Audit func(auditors ...*MethodAuditor) transport.ServiceOption + Begin func() Recorder + func GetAuditor(ctx servicehub.Context) Auditor + type GetScopeIDAndEntries func(ctx context.Context, req, resp interface{}, err error) (interface{}, map[string]interface{}, error) + type MethodAuditor struct + func Method(method interface{}, scope ScopeType, template string, ...) *MethodAuditor + func MethodWithError(method interface{}, scope ScopeType, template string, ...) *MethodAuditor + type NopAuditor struct + func (a *NopAuditor) Audit(auditors ...*MethodAuditor) transport.ServiceOption + func (a *NopAuditor) Begin() Recorder + func (a *NopAuditor) GetApp(idObject interface{}) (*apistructs.ApplicationDTO, error) + func (a *NopAuditor) GetOrg(id interface{}) (*orgpb.Org, error) + func (a *NopAuditor) GetProject(id interface{}) (*apistructs.ProjectDTO, error) + func (a *NopAuditor) Record(ctx context.Context, scope ScopeType, scopeID interface{}, template string, ...) + func (a *NopAuditor) RecordError(ctx context.Context, scope ScopeType, scopeID interface{}, template string, ...) + type Option func(opts *options) + func Entries(h func(ctx context.Context) (map[string]interface{}, error)) Option + func Entry(key string, val interface{}) Option + func OrgID(id interface{}) Option + func UserID(id interface{}) Option + type Recorder interface + Record func(ctx context.Context, scope ScopeType, scopeID interface{}, template string, ...) + RecordError func(ctx context.Context, scope ScopeType, scopeID interface{}, template string, ...) + type ScopeQueryer interface + GetApp func(idObject interface{}) (*apistructs.ApplicationDTO, error) + GetOrg func(id interface{}) (*orgpb.Org, error) + GetProject func(id interface{}) (*apistructs.ProjectDTO, error) + type ScopeType string + const AppScope + const OrgScope + const ProjectScope + const PublisherScope + const SysScope + type ValueFetcher func() interface + type ValueFetcherWithContext func(ctx context.Context) (interface{}, error)