Documentation
¶
Index ¶
- Constants
- Variables
- func LifecycleDatlyType() reflect.Type
- func WriterDatlyType() reflect.Type
- func WriterHandlerCurrentWriterIndexByConversationIdKey(value *CurrentWriterView) (string, bool)
- func WriterHandlerCurrentWriterIndexByCreatedAtKey(value *CurrentWriterView) (time.Time, bool)
- func WriterHandlerCurrentWriterIndexByIdKey(value *CurrentWriterView) (string, bool)
- func WriterHandlerCurrentWriterIndexByMessageIdKey(value *CurrentWriterView) (string, bool)
- func WriterHandlerCurrentWriterIndexByQueueSeqKey(value *CurrentWriterView) (int64, bool)
- func WriterHandlerCurrentWriterIndexByStatusKey(value *CurrentWriterView) (string, bool)
- func WriterHandlerCurrentWriterIndexByTurnIdKey(value *CurrentWriterView) (string, bool)
- func WriterHandlerCurrentWriterIndexByUpdatedAtKey(value *CurrentWriterView) (time.Time, bool)
- type CurrentWriterView
- type Input
- func (input *Input) PrepareReadIndexes(ctx context.Context) error
- func (input *Input) ReadIndexes(ctx context.Context) (*WriterHandlerReadIndexes, error)
- func (input *Input) SetCurrentWriter(value []*CurrentWriterView)
- func (input *Input) SetQueues(value []*TurnQueue)
- func (input *Input) SetWriterKeys(value []WriterKeysRow)
- type InputHas
- type Lifecycle
- func (hooks *Lifecycle) AfterQueue(ctx context.Context, entity *TurnQueue, ...) error
- func (hooks *Lifecycle) AfterSequence(ctx context.Context, entity *TurnQueue, ...) error
- func (hooks *Lifecycle) Finalize(ctx context.Context, input *Input, output *Output, outcome xhandler.Outcome) error
- func (hooks *Lifecycle) Init(ctx context.Context, entity *TurnQueue, ...) error
- func (hooks *Lifecycle) Validate(ctx context.Context, entity *TurnQueue, ...) error
- type Output
- type TurnQueue
- func (entity *TurnQueue) GetConversationId() string
- func (entity *TurnQueue) GetCreatedAt() *time.Time
- func (entity *TurnQueue) GetId() string
- func (entity *TurnQueue) GetMessageId() string
- func (entity *TurnQueue) GetQueueSeq() *int64
- func (entity *TurnQueue) GetShouldDelete() bool
- func (entity *TurnQueue) GetStatus() string
- func (entity *TurnQueue) GetTurnId() string
- func (entity *TurnQueue) GetUpdatedAt() *time.Time
- func (entity *TurnQueue) SetConversationId(value string)
- func (entity *TurnQueue) SetCreatedAt(value *time.Time)
- func (entity *TurnQueue) SetId(value string)
- func (entity *TurnQueue) SetMessageId(value string)
- func (entity *TurnQueue) SetQueueSeq(value *int64)
- func (entity *TurnQueue) SetShouldDelete(value bool)
- func (entity *TurnQueue) SetStatus(value string)
- func (entity *TurnQueue) SetTurnId(value string)
- func (entity *TurnQueue) SetUpdatedAt(value *time.Time)
- type TurnQueueHas
- type WriterComponent
- type WriterHandlerCurrentWriterGroupedByConversationId
- type WriterHandlerCurrentWriterGroupedByCreatedAt
- type WriterHandlerCurrentWriterGroupedById
- type WriterHandlerCurrentWriterGroupedByMessageId
- type WriterHandlerCurrentWriterGroupedByQueueSeq
- type WriterHandlerCurrentWriterGroupedByStatus
- type WriterHandlerCurrentWriterGroupedByTurnId
- type WriterHandlerCurrentWriterGroupedByUpdatedAt
- type WriterHandlerCurrentWriterIndexedByConversationId
- type WriterHandlerCurrentWriterIndexedByCreatedAt
- type WriterHandlerCurrentWriterIndexedById
- type WriterHandlerCurrentWriterIndexedByMessageId
- type WriterHandlerCurrentWriterIndexedByQueueSeq
- type WriterHandlerCurrentWriterIndexedByStatus
- type WriterHandlerCurrentWriterIndexedByTurnId
- type WriterHandlerCurrentWriterIndexedByUpdatedAt
- type WriterHandlerCurrentWriterSlice
- func (rows WriterHandlerCurrentWriterSlice) GroupByConversationId() WriterHandlerCurrentWriterGroupedByConversationId
- func (rows WriterHandlerCurrentWriterSlice) GroupByCreatedAt() WriterHandlerCurrentWriterGroupedByCreatedAt
- func (rows WriterHandlerCurrentWriterSlice) GroupById() WriterHandlerCurrentWriterGroupedById
- func (rows WriterHandlerCurrentWriterSlice) GroupByMessageId() WriterHandlerCurrentWriterGroupedByMessageId
- func (rows WriterHandlerCurrentWriterSlice) GroupByQueueSeq() WriterHandlerCurrentWriterGroupedByQueueSeq
- func (rows WriterHandlerCurrentWriterSlice) GroupByStatus() WriterHandlerCurrentWriterGroupedByStatus
- func (rows WriterHandlerCurrentWriterSlice) GroupByTurnId() WriterHandlerCurrentWriterGroupedByTurnId
- func (rows WriterHandlerCurrentWriterSlice) GroupByUpdatedAt() WriterHandlerCurrentWriterGroupedByUpdatedAt
- func (rows WriterHandlerCurrentWriterSlice) IndexByConversationId() (WriterHandlerCurrentWriterIndexedByConversationId, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByCreatedAt() (WriterHandlerCurrentWriterIndexedByCreatedAt, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexById() (WriterHandlerCurrentWriterIndexedById, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByMessageId() (WriterHandlerCurrentWriterIndexedByMessageId, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByQueueSeq() (WriterHandlerCurrentWriterIndexedByQueueSeq, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByStatus() (WriterHandlerCurrentWriterIndexedByStatus, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByTurnId() (WriterHandlerCurrentWriterIndexedByTurnId, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByUpdatedAt() (WriterHandlerCurrentWriterIndexedByUpdatedAt, error)
- type WriterHandlerReadIndexes
- type WriterKeysRow
Constants ¶
View Source
const WriterDatlyResourceNamespace = "datly_turnqueue_write_writer"
DatlyResourceNamespace identifies this package's generated resource filesystem.
Variables ¶
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 WriterHandlerCurrentWriterIndexByConversationIdKey ¶
func WriterHandlerCurrentWriterIndexByConversationIdKey(value *CurrentWriterView) (string, bool)
func WriterHandlerCurrentWriterIndexByCreatedAtKey ¶
func WriterHandlerCurrentWriterIndexByCreatedAtKey(value *CurrentWriterView) (time.Time, bool)
func WriterHandlerCurrentWriterIndexByIdKey ¶
func WriterHandlerCurrentWriterIndexByIdKey(value *CurrentWriterView) (string, bool)
func WriterHandlerCurrentWriterIndexByMessageIdKey ¶
func WriterHandlerCurrentWriterIndexByMessageIdKey(value *CurrentWriterView) (string, bool)
func WriterHandlerCurrentWriterIndexByQueueSeqKey ¶
func WriterHandlerCurrentWriterIndexByQueueSeqKey(value *CurrentWriterView) (int64, bool)
func WriterHandlerCurrentWriterIndexByStatusKey ¶
func WriterHandlerCurrentWriterIndexByStatusKey(value *CurrentWriterView) (string, bool)
func WriterHandlerCurrentWriterIndexByTurnIdKey ¶
func WriterHandlerCurrentWriterIndexByTurnIdKey(value *CurrentWriterView) (string, bool)
func WriterHandlerCurrentWriterIndexByUpdatedAtKey ¶
func WriterHandlerCurrentWriterIndexByUpdatedAtKey(value *CurrentWriterView) (time.Time, bool)
Types ¶
type CurrentWriterView ¶
type CurrentWriterView struct {
Id string `validate:"required" sqlx:"id,primaryKey" json:"id,omitempty"`
ConversationId string `sqlx:"conversation_id,refTable=conversation,refColumn=id,required=true" json:"conversationId,omitempty"`
TurnId string `sqlx:"turn_id,refTable=turn,refColumn=id,required=true" json:"turnId,omitempty"`
MessageId string `sqlx:"message_id,refTable=message,refColumn=id,required=true" json:"messageId,omitempty"`
QueueSeq *int64 `json:"queueSeq,omitempty" sqlx:"queue_seq,required=true"`
Status string `sqlx:"status,required=true" json:"status,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty" sqlx:"created_at,required=true"`
UpdatedAt *time.Time `json:"updatedAt,omitempty" sqlx:"updated_at"`
}
CurrentWriterView is generated canonical view metadata for writer.
type Input ¶
type Input struct {
Queues []*TurnQueue `` /* 204-byte string literal not displayed */
WriterKeys []WriterKeysRow `` /* 132-byte string literal not displayed */
CurrentWriter []*CurrentWriterView `` /* 169-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) SetCurrentWriter ¶
func (input *Input) SetCurrentWriter(value []*CurrentWriterView)
func (*Input) SetWriterKeys ¶
func (input *Input) SetWriterKeys(value []WriterKeysRow)
type Lifecycle ¶
type Lifecycle struct{}
Lifecycle customizes role Input.Queues.
func (*Lifecycle) AfterQueue ¶
func (*Lifecycle) AfterSequence ¶
type Output ¶
type Output struct {
Data []*TurnQueue `parameter:"Data,kind=output,in=body,dataType=[]*TurnQueue" json:"data"`
}
Output is the generated output scaffold for writer.
type TurnQueue ¶
type TurnQueue struct {
ShouldDelete bool `json:"shouldDelete,omitempty" sqlx:"-" writer:"delete"`
Id string `validate:"required" sqlx:"id,primaryKey" json:"id,omitempty"`
ConversationId string `sqlx:"conversation_id,refTable=conversation,refColumn=id,required=true" json:"conversationId,omitempty"`
TurnId string `sqlx:"turn_id,refTable=turn,refColumn=id,required=true" json:"turnId,omitempty"`
MessageId string `sqlx:"message_id,refTable=message,refColumn=id,required=true" json:"messageId,omitempty"`
QueueSeq *int64 `json:"queueSeq,omitempty" sqlx:"queue_seq,required=true"`
Status string `sqlx:"status,required=true" json:"status,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty" sqlx:"created_at,required=true"`
UpdatedAt *time.Time `json:"updatedAt,omitempty" sqlx:"updated_at"`
Has *TurnQueueHas `setMarker:"true" format:"-" sqlx:"-" diff:"-" json:"-" typeName:"TurnQueueHas"`
}
TurnQueue is generated canonical view metadata for writer.
func (*TurnQueue) GetConversationId ¶
func (*TurnQueue) GetCreatedAt ¶
func (*TurnQueue) GetMessageId ¶
func (*TurnQueue) GetQueueSeq ¶
func (*TurnQueue) GetShouldDelete ¶
func (*TurnQueue) GetUpdatedAt ¶
func (*TurnQueue) SetConversationId ¶
func (*TurnQueue) SetCreatedAt ¶
func (*TurnQueue) SetMessageId ¶
func (*TurnQueue) SetQueueSeq ¶
func (*TurnQueue) SetShouldDelete ¶
func (*TurnQueue) SetUpdatedAt ¶
type TurnQueueHas ¶
type WriterComponent ¶
type WriterComponent struct {
Contract xdatly.Component[Input, Output] "" /* 166-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 WriterHandlerCurrentWriterGroupedByConversationId ¶
type WriterHandlerCurrentWriterGroupedByConversationId map[string][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedByConversationId) Has ¶
func (index WriterHandlerCurrentWriterGroupedByConversationId) Has(key string) bool
type WriterHandlerCurrentWriterGroupedByCreatedAt ¶
type WriterHandlerCurrentWriterGroupedByCreatedAt map[time.Time][]*CurrentWriterView
type WriterHandlerCurrentWriterGroupedById ¶
type WriterHandlerCurrentWriterGroupedById map[string][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedById) Has ¶
func (index WriterHandlerCurrentWriterGroupedById) Has(key string) bool
type WriterHandlerCurrentWriterGroupedByMessageId ¶
type WriterHandlerCurrentWriterGroupedByMessageId map[string][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedByMessageId) Has ¶
func (index WriterHandlerCurrentWriterGroupedByMessageId) Has(key string) bool
type WriterHandlerCurrentWriterGroupedByQueueSeq ¶
type WriterHandlerCurrentWriterGroupedByQueueSeq map[int64][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedByQueueSeq) Has ¶
func (index WriterHandlerCurrentWriterGroupedByQueueSeq) Has(key int64) bool
type WriterHandlerCurrentWriterGroupedByStatus ¶
type WriterHandlerCurrentWriterGroupedByStatus map[string][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedByStatus) Has ¶
func (index WriterHandlerCurrentWriterGroupedByStatus) Has(key string) bool
type WriterHandlerCurrentWriterGroupedByTurnId ¶
type WriterHandlerCurrentWriterGroupedByTurnId map[string][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedByTurnId) Has ¶
func (index WriterHandlerCurrentWriterGroupedByTurnId) Has(key string) bool
type WriterHandlerCurrentWriterGroupedByUpdatedAt ¶
type WriterHandlerCurrentWriterGroupedByUpdatedAt map[time.Time][]*CurrentWriterView
type WriterHandlerCurrentWriterIndexedByConversationId ¶
type WriterHandlerCurrentWriterIndexedByConversationId map[string]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedByConversationId) Has ¶
func (index WriterHandlerCurrentWriterIndexedByConversationId) Has(key string) bool
type WriterHandlerCurrentWriterIndexedByCreatedAt ¶
type WriterHandlerCurrentWriterIndexedByCreatedAt map[time.Time]*CurrentWriterView
type WriterHandlerCurrentWriterIndexedById ¶
type WriterHandlerCurrentWriterIndexedById map[string]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedById) Has ¶
func (index WriterHandlerCurrentWriterIndexedById) Has(key string) bool
type WriterHandlerCurrentWriterIndexedByMessageId ¶
type WriterHandlerCurrentWriterIndexedByMessageId map[string]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedByMessageId) Has ¶
func (index WriterHandlerCurrentWriterIndexedByMessageId) Has(key string) bool
type WriterHandlerCurrentWriterIndexedByQueueSeq ¶
type WriterHandlerCurrentWriterIndexedByQueueSeq map[int64]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedByQueueSeq) Has ¶
func (index WriterHandlerCurrentWriterIndexedByQueueSeq) Has(key int64) bool
type WriterHandlerCurrentWriterIndexedByStatus ¶
type WriterHandlerCurrentWriterIndexedByStatus map[string]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedByStatus) Has ¶
func (index WriterHandlerCurrentWriterIndexedByStatus) Has(key string) bool
type WriterHandlerCurrentWriterIndexedByTurnId ¶
type WriterHandlerCurrentWriterIndexedByTurnId map[string]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedByTurnId) Has ¶
func (index WriterHandlerCurrentWriterIndexedByTurnId) Has(key string) bool
type WriterHandlerCurrentWriterIndexedByUpdatedAt ¶
type WriterHandlerCurrentWriterIndexedByUpdatedAt map[time.Time]*CurrentWriterView
type WriterHandlerCurrentWriterSlice ¶
type WriterHandlerCurrentWriterSlice []*CurrentWriterView
func (WriterHandlerCurrentWriterSlice) GroupByConversationId ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByConversationId() WriterHandlerCurrentWriterGroupedByConversationId
func (WriterHandlerCurrentWriterSlice) GroupByCreatedAt ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByCreatedAt() WriterHandlerCurrentWriterGroupedByCreatedAt
func (WriterHandlerCurrentWriterSlice) GroupById ¶
func (rows WriterHandlerCurrentWriterSlice) GroupById() WriterHandlerCurrentWriterGroupedById
func (WriterHandlerCurrentWriterSlice) GroupByMessageId ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByMessageId() WriterHandlerCurrentWriterGroupedByMessageId
func (WriterHandlerCurrentWriterSlice) GroupByQueueSeq ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByQueueSeq() WriterHandlerCurrentWriterGroupedByQueueSeq
func (WriterHandlerCurrentWriterSlice) GroupByStatus ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByStatus() WriterHandlerCurrentWriterGroupedByStatus
func (WriterHandlerCurrentWriterSlice) GroupByTurnId ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByTurnId() WriterHandlerCurrentWriterGroupedByTurnId
func (WriterHandlerCurrentWriterSlice) GroupByUpdatedAt ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByUpdatedAt() WriterHandlerCurrentWriterGroupedByUpdatedAt
func (WriterHandlerCurrentWriterSlice) IndexByConversationId ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByConversationId() (WriterHandlerCurrentWriterIndexedByConversationId, error)
func (WriterHandlerCurrentWriterSlice) IndexByCreatedAt ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByCreatedAt() (WriterHandlerCurrentWriterIndexedByCreatedAt, error)
func (WriterHandlerCurrentWriterSlice) IndexById ¶
func (rows WriterHandlerCurrentWriterSlice) IndexById() (WriterHandlerCurrentWriterIndexedById, error)
func (WriterHandlerCurrentWriterSlice) IndexByMessageId ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByMessageId() (WriterHandlerCurrentWriterIndexedByMessageId, error)
func (WriterHandlerCurrentWriterSlice) IndexByQueueSeq ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByQueueSeq() (WriterHandlerCurrentWriterIndexedByQueueSeq, error)
func (WriterHandlerCurrentWriterSlice) IndexByStatus ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByStatus() (WriterHandlerCurrentWriterIndexedByStatus, error)
func (WriterHandlerCurrentWriterSlice) IndexByTurnId ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByTurnId() (WriterHandlerCurrentWriterIndexedByTurnId, error)
func (WriterHandlerCurrentWriterSlice) IndexByUpdatedAt ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByUpdatedAt() (WriterHandlerCurrentWriterIndexedByUpdatedAt, error)
type WriterHandlerReadIndexes ¶
type WriterHandlerReadIndexes struct {
CurrentWriter WriterHandlerCurrentWriterSlice
CurrentWriterById WriterHandlerCurrentWriterIndexedById
}
func BuildWriterHandlerReadIndexes ¶
func BuildWriterHandlerReadIndexes(ctx context.Context, input *Input) (*WriterHandlerReadIndexes, error)
type WriterKeysRow ¶
type WriterKeysRow struct {
Id string `sqlx:"id"`
}
Click to show internal directories.
Click to hide internal directories.