Documentation
¶
Index ¶
- Constants
- Variables
- func LifecycleDatlyType() reflect.Type
- func WriterDatlyType() reflect.Type
- func WriterHandlerCurrentWriterIndexByActivationSourceKey(value *CurrentWriterView) (string, bool)
- func WriterHandlerCurrentWriterIndexByActiveReportRunIdKey(value *CurrentWriterView) (string, bool)
- func WriterHandlerCurrentWriterIndexByActorIdKey(value *CurrentWriterView) (string, bool)
- func WriterHandlerCurrentWriterIndexByConversationIdKey(value *CurrentWriterView) (string, bool)
- func WriterHandlerCurrentWriterIndexByOwnerIdKey(value *CurrentWriterView) (string, bool)
- func WriterHandlerCurrentWriterIndexByRevisionKey(value *CurrentWriterView) (int64, bool)
- func WriterHandlerCurrentWriterIndexByUpdatedAtKey(value *CurrentWriterView) (time.Time, bool)
- type Context
- func (entity *Context) GetActivationSource() string
- func (entity *Context) GetActiveReportRunId() string
- func (entity *Context) GetActorId() string
- func (entity *Context) GetConversationId() string
- func (entity *Context) GetOwnerId() string
- func (entity *Context) GetRevision() int64
- func (entity *Context) GetShouldDelete() bool
- func (entity *Context) GetUpdatedAt() time.Time
- func (entity *Context) SetActivationSource(value string)
- func (entity *Context) SetActiveReportRunId(value string)
- func (entity *Context) SetActorId(value string)
- func (entity *Context) SetConversationId(value string)
- func (entity *Context) SetOwnerId(value string)
- func (entity *Context) SetRevision(value int64)
- func (entity *Context) SetShouldDelete(value bool)
- func (entity *Context) SetUpdatedAt(value time.Time)
- type ContextHas
- type CurrentWriterView
- type Input
- func (input *Input) PrepareReadIndexes(ctx context.Context) error
- func (input *Input) ReadIndexes(ctx context.Context) (*WriterHandlerReadIndexes, error)
- func (input *Input) SetContexts(value []*Context)
- func (input *Input) SetCurrentWriter(value []*CurrentWriterView)
- func (input *Input) SetDesiredRevision(value int64)
- func (input *Input) SetInternal(value bool)
- func (input *Input) SetOwnerSubject(value *string)
- func (input *Input) SetWriterKeys(value []WriterKeysRow)
- type InputHas
- type Lifecycle
- func (hooks *Lifecycle) AfterQueue(ctx context.Context, entity *Context, ...) error
- func (hooks *Lifecycle) AfterSequence(ctx context.Context, entity *Context, ...) error
- func (hooks *Lifecycle) Finalize(ctx context.Context, input *Input, output *Output, outcome xhandler.Outcome) error
- func (hooks *Lifecycle) Init(ctx context.Context, entity *Context, ...) error
- func (hooks *Lifecycle) Validate(ctx context.Context, entity *Context, ...) error
- type Output
- type WriterComponent
- type WriterHandlerCurrentWriterGroupedByActivationSource
- type WriterHandlerCurrentWriterGroupedByActiveReportRunId
- type WriterHandlerCurrentWriterGroupedByActorId
- type WriterHandlerCurrentWriterGroupedByConversationId
- type WriterHandlerCurrentWriterGroupedByKey
- type WriterHandlerCurrentWriterGroupedByOwnerId
- type WriterHandlerCurrentWriterGroupedByRevision
- type WriterHandlerCurrentWriterGroupedByUpdatedAt
- type WriterHandlerCurrentWriterIndexedByActivationSource
- type WriterHandlerCurrentWriterIndexedByActiveReportRunId
- type WriterHandlerCurrentWriterIndexedByActorId
- type WriterHandlerCurrentWriterIndexedByConversationId
- type WriterHandlerCurrentWriterIndexedByKey
- type WriterHandlerCurrentWriterIndexedByOwnerId
- type WriterHandlerCurrentWriterIndexedByRevision
- type WriterHandlerCurrentWriterIndexedByUpdatedAt
- type WriterHandlerCurrentWriterKey
- type WriterHandlerCurrentWriterSlice
- func (rows WriterHandlerCurrentWriterSlice) GroupByActivationSource() WriterHandlerCurrentWriterGroupedByActivationSource
- func (rows WriterHandlerCurrentWriterSlice) GroupByActiveReportRunId() WriterHandlerCurrentWriterGroupedByActiveReportRunId
- func (rows WriterHandlerCurrentWriterSlice) GroupByActorId() WriterHandlerCurrentWriterGroupedByActorId
- func (rows WriterHandlerCurrentWriterSlice) GroupByConversationId() WriterHandlerCurrentWriterGroupedByConversationId
- func (rows WriterHandlerCurrentWriterSlice) GroupByKey() WriterHandlerCurrentWriterGroupedByKey
- func (rows WriterHandlerCurrentWriterSlice) GroupByOwnerId() WriterHandlerCurrentWriterGroupedByOwnerId
- func (rows WriterHandlerCurrentWriterSlice) GroupByRevision() WriterHandlerCurrentWriterGroupedByRevision
- func (rows WriterHandlerCurrentWriterSlice) GroupByUpdatedAt() WriterHandlerCurrentWriterGroupedByUpdatedAt
- func (rows WriterHandlerCurrentWriterSlice) IndexByActivationSource() (WriterHandlerCurrentWriterIndexedByActivationSource, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByActiveReportRunId() (WriterHandlerCurrentWriterIndexedByActiveReportRunId, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByActorId() (WriterHandlerCurrentWriterIndexedByActorId, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByConversationId() (WriterHandlerCurrentWriterIndexedByConversationId, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByKey() (WriterHandlerCurrentWriterIndexedByKey, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByOwnerId() (WriterHandlerCurrentWriterIndexedByOwnerId, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByRevision() (WriterHandlerCurrentWriterIndexedByRevision, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByUpdatedAt() (WriterHandlerCurrentWriterIndexedByUpdatedAt, error)
- type WriterHandlerReadIndexes
- type WriterKeysRow
Constants ¶
View Source
const WriterDatlyResourceNamespace = "reporting_context_write_writer"
DatlyResourceNamespace identifies this package's generated resource filesystem.
Variables ¶
View Source
var ( ErrOwnerDenied = errors.New("report context owner denied") ErrNotFound = errors.New("report context not found") ErrCASMismatch = errors.New("report context revision mismatch") )
View Source
var ( LifecycleHooks = new(Lifecycle) LifecycleDatly = LifecycleDatlyType() )
View Source
var WriterDatly = new(WriterComponent)
The public value supports explicit component wiring.
View Source
var WriterDatlyResources embed.FS
Functions ¶
func LifecycleDatlyType ¶
func WriterDatlyType ¶
WriterDatlyType returns the public component type.
func WriterHandlerCurrentWriterIndexByActivationSourceKey ¶
func WriterHandlerCurrentWriterIndexByActivationSourceKey(value *CurrentWriterView) (string, bool)
func WriterHandlerCurrentWriterIndexByActiveReportRunIdKey ¶
func WriterHandlerCurrentWriterIndexByActiveReportRunIdKey(value *CurrentWriterView) (string, bool)
func WriterHandlerCurrentWriterIndexByActorIdKey ¶
func WriterHandlerCurrentWriterIndexByActorIdKey(value *CurrentWriterView) (string, bool)
func WriterHandlerCurrentWriterIndexByConversationIdKey ¶
func WriterHandlerCurrentWriterIndexByConversationIdKey(value *CurrentWriterView) (string, bool)
func WriterHandlerCurrentWriterIndexByOwnerIdKey ¶
func WriterHandlerCurrentWriterIndexByOwnerIdKey(value *CurrentWriterView) (string, bool)
func WriterHandlerCurrentWriterIndexByRevisionKey ¶
func WriterHandlerCurrentWriterIndexByRevisionKey(value *CurrentWriterView) (int64, bool)
func WriterHandlerCurrentWriterIndexByUpdatedAtKey ¶
func WriterHandlerCurrentWriterIndexByUpdatedAtKey(value *CurrentWriterView) (time.Time, bool)
Types ¶
type Context ¶
type Context struct {
ShouldDelete bool `json:"shouldDelete,omitempty" sqlx:"-" writer:"delete"`
Revision int64 `writer:"concurrency" sqlx:"revision,required=true" json:"revision,omitempty"`
OwnerId string `sqlx:"owner_id,primaryKey=true,required=true,refTable=report_run,refColumn=owner_id" json:"ownerId,omitempty"`
ConversationId string `sqlx:"conversation_id,primaryKey=true,required=true,refTable=conversation,refColumn=id" json:"conversationId,omitempty"`
ActiveReportRunId string `sqlx:"active_report_run_id,refTable=report_run,refColumn=report_run_id,required=true" json:"activeReportRunId,omitempty"`
ActivationSource string `sqlx:"activation_source,required=true" json:"activationSource,omitempty"`
ActorId string `sqlx:"actor_id,required=true" json:"actorId,omitempty"`
UpdatedAt time.Time `sqlx:"updated_at,required=true" json:"updatedAt,omitempty"`
Has *ContextHas `setMarker:"true" format:"-" sqlx:"-" diff:"-" json:"-" typeName:"ContextHas"`
}
Context is generated canonical view metadata for writer.
func (*Context) GetActivationSource ¶
func (*Context) GetActiveReportRunId ¶
func (*Context) GetActorId ¶
func (*Context) GetConversationId ¶
func (*Context) GetOwnerId ¶
func (*Context) GetRevision ¶
func (*Context) GetShouldDelete ¶
func (*Context) GetUpdatedAt ¶
func (*Context) SetActivationSource ¶
func (*Context) SetActiveReportRunId ¶
func (*Context) SetActorId ¶
func (*Context) SetConversationId ¶
func (*Context) SetOwnerId ¶
func (*Context) SetRevision ¶
func (*Context) SetShouldDelete ¶
func (*Context) SetUpdatedAt ¶
type ContextHas ¶
type CurrentWriterView ¶
type CurrentWriterView struct {
Revision int64 `sqlx:"revision,required=true" json:"revision,omitempty"`
OwnerId string `sqlx:"owner_id,primaryKey=true,required=true,refTable=report_run,refColumn=owner_id" json:"ownerId,omitempty"`
ConversationId string `sqlx:"conversation_id,primaryKey=true,required=true,refTable=conversation,refColumn=id" json:"conversationId,omitempty"`
ActiveReportRunId string `sqlx:"active_report_run_id,refTable=report_run,refColumn=report_run_id,required=true" json:"activeReportRunId,omitempty"`
ActivationSource string `sqlx:"activation_source,required=true" json:"activationSource,omitempty"`
ActorId string `sqlx:"actor_id,required=true" json:"actorId,omitempty"`
UpdatedAt time.Time `sqlx:"updated_at,required=true" json:"updatedAt,omitempty"`
}
CurrentWriterView is generated canonical view metadata for writer.
type Input ¶
type Input struct {
Internal bool `parameter:"Internal,kind=reportaccess,in=internal,dataType=bool,required=true"`
OwnerSubject *string `parameter:"OwnerSubject,kind=visibility,in=subject,dataType=*string,required=true"`
DesiredRevision int64 `parameter:"DesiredRevision,kind=query,in=desiredRevision,dataType=int64,required=false"`
Contexts []*Context `` /* 220-byte string literal not displayed */
WriterKeys []WriterKeysRow `` /* 136-byte string literal not displayed */
CurrentWriter []*CurrentWriterView `` /* 188-byte string literal not displayed */
Has *InputHas `setMarker:"true" typeName:"InputHas" json:"-" sqlx:"-"`
// contains filtered or unexported fields
}
Input is the generated input scaffold for writer.
func (*Input) PrepareReadIndexes ¶
func (*Input) ReadIndexes ¶
func (input *Input) ReadIndexes(ctx context.Context) (*WriterHandlerReadIndexes, error)
func (*Input) SetContexts ¶
func (*Input) SetCurrentWriter ¶
func (input *Input) SetCurrentWriter(value []*CurrentWriterView)
func (*Input) SetDesiredRevision ¶
func (*Input) SetInternal ¶
func (*Input) SetOwnerSubject ¶
func (*Input) SetWriterKeys ¶
func (input *Input) SetWriterKeys(value []WriterKeysRow)
type Lifecycle ¶
type Lifecycle struct {
Input *Input `bind:"kind=input"`
}
Lifecycle customizes role Input.Contexts.
func (*Lifecycle) AfterQueue ¶
func (*Lifecycle) AfterSequence ¶
type Output ¶
type Output struct {
Data []*Context `parameter:"Data,kind=output,in=body,dataType=[]*Context" json:"data"`
}
Output is the generated output scaffold for writer.
type WriterComponent ¶
type WriterComponent struct {
Contract xdatly.Component[Input, Output] "" /* 190-byte string literal not displayed */
}
Component is the generated component scaffold for writer.
func (WriterComponent) EmbedFS ¶
func (WriterComponent) EmbedFS() *embed.FS
func (WriterComponent) EmbedNamespace ¶
func (WriterComponent) EmbedNamespace() string
type WriterHandlerCurrentWriterGroupedByActivationSource ¶
type WriterHandlerCurrentWriterGroupedByActivationSource map[string][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedByActivationSource) Has ¶
func (index WriterHandlerCurrentWriterGroupedByActivationSource) Has(key string) bool
type WriterHandlerCurrentWriterGroupedByActiveReportRunId ¶
type WriterHandlerCurrentWriterGroupedByActiveReportRunId map[string][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedByActiveReportRunId) Has ¶
func (index WriterHandlerCurrentWriterGroupedByActiveReportRunId) Has(key string) bool
type WriterHandlerCurrentWriterGroupedByActorId ¶
type WriterHandlerCurrentWriterGroupedByActorId map[string][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedByActorId) Has ¶
func (index WriterHandlerCurrentWriterGroupedByActorId) Has(key string) bool
type WriterHandlerCurrentWriterGroupedByConversationId ¶
type WriterHandlerCurrentWriterGroupedByConversationId map[string][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedByConversationId) Has ¶
func (index WriterHandlerCurrentWriterGroupedByConversationId) Has(key string) bool
type WriterHandlerCurrentWriterGroupedByKey ¶
type WriterHandlerCurrentWriterGroupedByKey map[WriterHandlerCurrentWriterKey][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedByKey) Has ¶
func (index WriterHandlerCurrentWriterGroupedByKey) Has(key WriterHandlerCurrentWriterKey) bool
type WriterHandlerCurrentWriterGroupedByOwnerId ¶
type WriterHandlerCurrentWriterGroupedByOwnerId map[string][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedByOwnerId) Has ¶
func (index WriterHandlerCurrentWriterGroupedByOwnerId) Has(key string) bool
type WriterHandlerCurrentWriterGroupedByRevision ¶
type WriterHandlerCurrentWriterGroupedByRevision map[int64][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedByRevision) Has ¶
func (index WriterHandlerCurrentWriterGroupedByRevision) Has(key int64) bool
type WriterHandlerCurrentWriterGroupedByUpdatedAt ¶
type WriterHandlerCurrentWriterGroupedByUpdatedAt map[time.Time][]*CurrentWriterView
type WriterHandlerCurrentWriterIndexedByActivationSource ¶
type WriterHandlerCurrentWriterIndexedByActivationSource map[string]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedByActivationSource) Has ¶
func (index WriterHandlerCurrentWriterIndexedByActivationSource) Has(key string) bool
type WriterHandlerCurrentWriterIndexedByActiveReportRunId ¶
type WriterHandlerCurrentWriterIndexedByActiveReportRunId map[string]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedByActiveReportRunId) Has ¶
func (index WriterHandlerCurrentWriterIndexedByActiveReportRunId) Has(key string) bool
type WriterHandlerCurrentWriterIndexedByActorId ¶
type WriterHandlerCurrentWriterIndexedByActorId map[string]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedByActorId) Has ¶
func (index WriterHandlerCurrentWriterIndexedByActorId) Has(key string) bool
type WriterHandlerCurrentWriterIndexedByConversationId ¶
type WriterHandlerCurrentWriterIndexedByConversationId map[string]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedByConversationId) Has ¶
func (index WriterHandlerCurrentWriterIndexedByConversationId) Has(key string) bool
type WriterHandlerCurrentWriterIndexedByKey ¶
type WriterHandlerCurrentWriterIndexedByKey map[WriterHandlerCurrentWriterKey]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedByKey) Has ¶
func (index WriterHandlerCurrentWriterIndexedByKey) Has(key WriterHandlerCurrentWriterKey) bool
type WriterHandlerCurrentWriterIndexedByOwnerId ¶
type WriterHandlerCurrentWriterIndexedByOwnerId map[string]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedByOwnerId) Has ¶
func (index WriterHandlerCurrentWriterIndexedByOwnerId) Has(key string) bool
type WriterHandlerCurrentWriterIndexedByRevision ¶
type WriterHandlerCurrentWriterIndexedByRevision map[int64]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedByRevision) Has ¶
func (index WriterHandlerCurrentWriterIndexedByRevision) Has(key int64) bool
type WriterHandlerCurrentWriterIndexedByUpdatedAt ¶
type WriterHandlerCurrentWriterIndexedByUpdatedAt map[time.Time]*CurrentWriterView
type WriterHandlerCurrentWriterKey ¶
func WriterHandlerCurrentWriterIndexByKeyKey ¶
func WriterHandlerCurrentWriterIndexByKeyKey(value *CurrentWriterView) (WriterHandlerCurrentWriterKey, bool)
type WriterHandlerCurrentWriterSlice ¶
type WriterHandlerCurrentWriterSlice []*CurrentWriterView
func (WriterHandlerCurrentWriterSlice) GroupByActivationSource ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByActivationSource() WriterHandlerCurrentWriterGroupedByActivationSource
func (WriterHandlerCurrentWriterSlice) GroupByActiveReportRunId ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByActiveReportRunId() WriterHandlerCurrentWriterGroupedByActiveReportRunId
func (WriterHandlerCurrentWriterSlice) GroupByActorId ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByActorId() WriterHandlerCurrentWriterGroupedByActorId
func (WriterHandlerCurrentWriterSlice) GroupByConversationId ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByConversationId() WriterHandlerCurrentWriterGroupedByConversationId
func (WriterHandlerCurrentWriterSlice) GroupByKey ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByKey() WriterHandlerCurrentWriterGroupedByKey
func (WriterHandlerCurrentWriterSlice) GroupByOwnerId ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByOwnerId() WriterHandlerCurrentWriterGroupedByOwnerId
func (WriterHandlerCurrentWriterSlice) GroupByRevision ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByRevision() WriterHandlerCurrentWriterGroupedByRevision
func (WriterHandlerCurrentWriterSlice) GroupByUpdatedAt ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByUpdatedAt() WriterHandlerCurrentWriterGroupedByUpdatedAt
func (WriterHandlerCurrentWriterSlice) IndexByActivationSource ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByActivationSource() (WriterHandlerCurrentWriterIndexedByActivationSource, error)
func (WriterHandlerCurrentWriterSlice) IndexByActiveReportRunId ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByActiveReportRunId() (WriterHandlerCurrentWriterIndexedByActiveReportRunId, error)
func (WriterHandlerCurrentWriterSlice) IndexByActorId ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByActorId() (WriterHandlerCurrentWriterIndexedByActorId, error)
func (WriterHandlerCurrentWriterSlice) IndexByConversationId ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByConversationId() (WriterHandlerCurrentWriterIndexedByConversationId, error)
func (WriterHandlerCurrentWriterSlice) IndexByKey ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByKey() (WriterHandlerCurrentWriterIndexedByKey, error)
func (WriterHandlerCurrentWriterSlice) IndexByOwnerId ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByOwnerId() (WriterHandlerCurrentWriterIndexedByOwnerId, error)
func (WriterHandlerCurrentWriterSlice) IndexByRevision ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByRevision() (WriterHandlerCurrentWriterIndexedByRevision, error)
func (WriterHandlerCurrentWriterSlice) IndexByUpdatedAt ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByUpdatedAt() (WriterHandlerCurrentWriterIndexedByUpdatedAt, error)
type WriterHandlerReadIndexes ¶
type WriterHandlerReadIndexes struct {
CurrentWriter WriterHandlerCurrentWriterSlice
CurrentWriterByKey WriterHandlerCurrentWriterIndexedByKey
}
func BuildWriterHandlerReadIndexes ¶
func BuildWriterHandlerReadIndexes(ctx context.Context, input *Input) (*WriterHandlerReadIndexes, error)
type WriterKeysRow ¶
Click to show internal directories.
Click to hide internal directories.