Help us shape the future of Go! Take the 2026 Go Developer Survey

write

package
v0.1.58 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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 LifecycleDatlyType() reflect.Type

func WriterDatlyType

func WriterDatlyType() reflect.Type

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 *Input) PrepareReadIndexes(ctx context.Context) error

func (*Input) ReadIndexes

func (input *Input) ReadIndexes(ctx context.Context) (*WriterHandlerReadIndexes, error)

func (*Input) SetCurrentWriter

func (input *Input) SetCurrentWriter(value []*CurrentWriterView)

func (*Input) SetQueues

func (input *Input) SetQueues(value []*TurnQueue)

func (*Input) SetWriterKeys

func (input *Input) SetWriterKeys(value []WriterKeysRow)

type InputHas

type InputHas struct {
	Queues        bool
	WriterKeys    bool
	CurrentWriter bool
}

type Lifecycle

type Lifecycle struct{}

Lifecycle customizes role Input.Queues.

func (*Lifecycle) AfterQueue

func (*Lifecycle) AfterSequence

func (hooks *Lifecycle) AfterSequence(ctx context.Context, entity *TurnQueue, state xhandler.LifecycleContext[TurnQueue, xhandler.NoParent, Output]) error

func (*Lifecycle) Finalize

func (hooks *Lifecycle) Finalize(ctx context.Context, input *Input, output *Output, outcome xhandler.Outcome) error

func (*Lifecycle) Init

func (*Lifecycle) Validate

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 (entity *TurnQueue) GetConversationId() string

func (*TurnQueue) GetCreatedAt

func (entity *TurnQueue) GetCreatedAt() *time.Time

func (*TurnQueue) GetId

func (entity *TurnQueue) GetId() string

func (*TurnQueue) GetMessageId

func (entity *TurnQueue) GetMessageId() string

func (*TurnQueue) GetQueueSeq

func (entity *TurnQueue) GetQueueSeq() *int64

func (*TurnQueue) GetShouldDelete

func (entity *TurnQueue) GetShouldDelete() bool

func (*TurnQueue) GetStatus

func (entity *TurnQueue) GetStatus() string

func (*TurnQueue) GetTurnId

func (entity *TurnQueue) GetTurnId() string

func (*TurnQueue) GetUpdatedAt

func (entity *TurnQueue) GetUpdatedAt() *time.Time

func (*TurnQueue) SetConversationId

func (entity *TurnQueue) SetConversationId(value string)

func (*TurnQueue) SetCreatedAt

func (entity *TurnQueue) SetCreatedAt(value *time.Time)

func (*TurnQueue) SetId

func (entity *TurnQueue) SetId(value string)

func (*TurnQueue) SetMessageId

func (entity *TurnQueue) SetMessageId(value string)

func (*TurnQueue) SetQueueSeq

func (entity *TurnQueue) SetQueueSeq(value *int64)

func (*TurnQueue) SetShouldDelete

func (entity *TurnQueue) SetShouldDelete(value bool)

func (*TurnQueue) SetStatus

func (entity *TurnQueue) SetStatus(value string)

func (*TurnQueue) SetTurnId

func (entity *TurnQueue) SetTurnId(value string)

func (*TurnQueue) SetUpdatedAt

func (entity *TurnQueue) SetUpdatedAt(value *time.Time)

type TurnQueueHas

type TurnQueueHas struct {
	ShouldDelete   bool
	Id             bool
	ConversationId bool
	TurnId         bool
	MessageId      bool
	QueueSeq       bool
	Status         bool
	CreatedAt      bool
	UpdatedAt      bool
}

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

type WriterHandlerCurrentWriterGroupedByCreatedAt

type WriterHandlerCurrentWriterGroupedByCreatedAt map[time.Time][]*CurrentWriterView

func (WriterHandlerCurrentWriterGroupedByCreatedAt) Has

type WriterHandlerCurrentWriterGroupedById

type WriterHandlerCurrentWriterGroupedById map[string][]*CurrentWriterView

func (WriterHandlerCurrentWriterGroupedById) Has

type WriterHandlerCurrentWriterGroupedByMessageId

type WriterHandlerCurrentWriterGroupedByMessageId map[string][]*CurrentWriterView

func (WriterHandlerCurrentWriterGroupedByMessageId) Has

type WriterHandlerCurrentWriterGroupedByQueueSeq

type WriterHandlerCurrentWriterGroupedByQueueSeq map[int64][]*CurrentWriterView

func (WriterHandlerCurrentWriterGroupedByQueueSeq) Has

type WriterHandlerCurrentWriterGroupedByStatus

type WriterHandlerCurrentWriterGroupedByStatus map[string][]*CurrentWriterView

func (WriterHandlerCurrentWriterGroupedByStatus) Has

type WriterHandlerCurrentWriterGroupedByTurnId

type WriterHandlerCurrentWriterGroupedByTurnId map[string][]*CurrentWriterView

func (WriterHandlerCurrentWriterGroupedByTurnId) Has

type WriterHandlerCurrentWriterGroupedByUpdatedAt

type WriterHandlerCurrentWriterGroupedByUpdatedAt map[time.Time][]*CurrentWriterView

func (WriterHandlerCurrentWriterGroupedByUpdatedAt) Has

type WriterHandlerCurrentWriterIndexedByConversationId

type WriterHandlerCurrentWriterIndexedByConversationId map[string]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByConversationId) Has

type WriterHandlerCurrentWriterIndexedByCreatedAt

type WriterHandlerCurrentWriterIndexedByCreatedAt map[time.Time]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByCreatedAt) Has

type WriterHandlerCurrentWriterIndexedById

type WriterHandlerCurrentWriterIndexedById map[string]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedById) Has

type WriterHandlerCurrentWriterIndexedByMessageId

type WriterHandlerCurrentWriterIndexedByMessageId map[string]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByMessageId) Has

type WriterHandlerCurrentWriterIndexedByQueueSeq

type WriterHandlerCurrentWriterIndexedByQueueSeq map[int64]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByQueueSeq) Has

type WriterHandlerCurrentWriterIndexedByStatus

type WriterHandlerCurrentWriterIndexedByStatus map[string]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByStatus) Has

type WriterHandlerCurrentWriterIndexedByTurnId

type WriterHandlerCurrentWriterIndexedByTurnId map[string]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByTurnId) Has

type WriterHandlerCurrentWriterIndexedByUpdatedAt

type WriterHandlerCurrentWriterIndexedByUpdatedAt map[time.Time]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByUpdatedAt) Has

type WriterHandlerCurrentWriterSlice

type WriterHandlerCurrentWriterSlice []*CurrentWriterView

func (WriterHandlerCurrentWriterSlice) GroupByConversationId

func (WriterHandlerCurrentWriterSlice) GroupByCreatedAt

func (WriterHandlerCurrentWriterSlice) GroupById

func (WriterHandlerCurrentWriterSlice) GroupByMessageId

func (WriterHandlerCurrentWriterSlice) GroupByQueueSeq

func (WriterHandlerCurrentWriterSlice) GroupByStatus

func (WriterHandlerCurrentWriterSlice) GroupByTurnId

func (WriterHandlerCurrentWriterSlice) GroupByUpdatedAt

func (WriterHandlerCurrentWriterSlice) IndexByConversationId

func (WriterHandlerCurrentWriterSlice) IndexByCreatedAt

func (WriterHandlerCurrentWriterSlice) IndexById

func (WriterHandlerCurrentWriterSlice) IndexByMessageId

func (WriterHandlerCurrentWriterSlice) IndexByQueueSeq

func (WriterHandlerCurrentWriterSlice) IndexByStatus

func (WriterHandlerCurrentWriterSlice) IndexByTurnId

func (WriterHandlerCurrentWriterSlice) IndexByUpdatedAt

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL