Documentation
¶
Index ¶
- Constants
- Variables
- func LifecycleDatlyType() reflect.Type
- func WriterDatlyType() reflect.Type
- func WriterHandlerCurrentWriterIndexByCreatedAtKey(value *CurrentWriterView) (time.Time, bool)
- func WriterHandlerCurrentWriterIndexByExpiresAtKey(value *CurrentWriterView) (time.Time, bool)
- func WriterHandlerCurrentWriterIndexByIdKey(value *CurrentWriterView) (string, bool)
- func WriterHandlerCurrentWriterIndexByProviderKey(value *CurrentWriterView) (string, bool)
- func WriterHandlerCurrentWriterIndexByUpdatedAtKey(value *CurrentWriterView) (time.Time, bool)
- func WriterHandlerCurrentWriterIndexByUserIdKey(value *CurrentWriterView) (string, 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) SetSession(value []*Session)
- func (input *Input) SetWriterKeys(value []WriterKeysRow)
- type InputHas
- type Lifecycle
- func (hooks *Lifecycle) AfterQueue(ctx context.Context, entity *Session, ...) error
- func (hooks *Lifecycle) AfterSequence(ctx context.Context, entity *Session, ...) error
- func (hooks *Lifecycle) Finalize(ctx context.Context, input *Input, output *Output, outcome xhandler.Outcome) error
- func (hooks *Lifecycle) Init(ctx context.Context, entity *Session, ...) error
- func (hooks *Lifecycle) Validate(ctx context.Context, entity *Session, ...) error
- type Output
- type Session
- func (entity *Session) GetCreatedAt() time.Time
- func (entity *Session) GetExpiresAt() time.Time
- func (entity *Session) GetId() string
- func (entity *Session) GetProvider() string
- func (entity *Session) GetShouldDelete() bool
- func (entity *Session) GetUpdatedAt() *time.Time
- func (entity *Session) GetUserId() string
- func (entity *Session) SetCreatedAt(value time.Time)
- func (entity *Session) SetExpiresAt(value time.Time)
- func (entity *Session) SetId(value string)
- func (entity *Session) SetProvider(value string)
- func (entity *Session) SetShouldDelete(value bool)
- func (entity *Session) SetUpdatedAt(value *time.Time)
- func (entity *Session) SetUserId(value string)
- type SessionHas
- type WriterComponent
- type WriterHandlerCurrentWriterGroupedByCreatedAt
- type WriterHandlerCurrentWriterGroupedByExpiresAt
- type WriterHandlerCurrentWriterGroupedById
- type WriterHandlerCurrentWriterGroupedByProvider
- type WriterHandlerCurrentWriterGroupedByUpdatedAt
- type WriterHandlerCurrentWriterGroupedByUserId
- type WriterHandlerCurrentWriterIndexedByCreatedAt
- type WriterHandlerCurrentWriterIndexedByExpiresAt
- type WriterHandlerCurrentWriterIndexedById
- type WriterHandlerCurrentWriterIndexedByProvider
- type WriterHandlerCurrentWriterIndexedByUpdatedAt
- type WriterHandlerCurrentWriterIndexedByUserId
- type WriterHandlerCurrentWriterSlice
- func (rows WriterHandlerCurrentWriterSlice) GroupByCreatedAt() WriterHandlerCurrentWriterGroupedByCreatedAt
- func (rows WriterHandlerCurrentWriterSlice) GroupByExpiresAt() WriterHandlerCurrentWriterGroupedByExpiresAt
- func (rows WriterHandlerCurrentWriterSlice) GroupById() WriterHandlerCurrentWriterGroupedById
- func (rows WriterHandlerCurrentWriterSlice) GroupByProvider() WriterHandlerCurrentWriterGroupedByProvider
- func (rows WriterHandlerCurrentWriterSlice) GroupByUpdatedAt() WriterHandlerCurrentWriterGroupedByUpdatedAt
- func (rows WriterHandlerCurrentWriterSlice) GroupByUserId() WriterHandlerCurrentWriterGroupedByUserId
- func (rows WriterHandlerCurrentWriterSlice) IndexByCreatedAt() (WriterHandlerCurrentWriterIndexedByCreatedAt, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByExpiresAt() (WriterHandlerCurrentWriterIndexedByExpiresAt, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexById() (WriterHandlerCurrentWriterIndexedById, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByProvider() (WriterHandlerCurrentWriterIndexedByProvider, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByUpdatedAt() (WriterHandlerCurrentWriterIndexedByUpdatedAt, error)
- func (rows WriterHandlerCurrentWriterSlice) IndexByUserId() (WriterHandlerCurrentWriterIndexedByUserId, error)
- type WriterHandlerReadIndexes
- type WriterKeysRow
Constants ¶
View Source
const WriterDatlyResourceNamespace = "datly_session_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 WriterHandlerCurrentWriterIndexByCreatedAtKey ¶
func WriterHandlerCurrentWriterIndexByCreatedAtKey(value *CurrentWriterView) (time.Time, bool)
func WriterHandlerCurrentWriterIndexByExpiresAtKey ¶
func WriterHandlerCurrentWriterIndexByExpiresAtKey(value *CurrentWriterView) (time.Time, bool)
func WriterHandlerCurrentWriterIndexByIdKey ¶
func WriterHandlerCurrentWriterIndexByIdKey(value *CurrentWriterView) (string, bool)
func WriterHandlerCurrentWriterIndexByProviderKey ¶
func WriterHandlerCurrentWriterIndexByProviderKey(value *CurrentWriterView) (string, bool)
func WriterHandlerCurrentWriterIndexByUpdatedAtKey ¶
func WriterHandlerCurrentWriterIndexByUpdatedAtKey(value *CurrentWriterView) (time.Time, bool)
func WriterHandlerCurrentWriterIndexByUserIdKey ¶
func WriterHandlerCurrentWriterIndexByUserIdKey(value *CurrentWriterView) (string, bool)
Types ¶
type CurrentWriterView ¶
type CurrentWriterView struct {
Id string `sqlx:"id,primaryKey" json:"id,omitempty"`
UserId string `sqlx:"user_id,required=true" json:"userId,omitempty"`
Provider string `sqlx:"provider,required=true" json:"provider,omitempty"`
CreatedAt time.Time `format:"2006-01-02 15:04:05" sqlx:"created_at,required=true" json:"createdAt,omitempty"`
UpdatedAt *time.Time `format:"2006-01-02 15:04:05" sqlx:"updated_at" json:"updatedAt,omitempty"`
ExpiresAt time.Time `format:"2006-01-02 15:04:05" sqlx:"expires_at,required=true" json:"expiresAt,omitempty"`
}
CurrentWriterView is generated canonical view metadata for writer.
type Input ¶
type Input struct {
Session []*Session `` /* 196-byte string literal not displayed */
WriterKeys []WriterKeysRow `` /* 131-byte string literal not displayed */
CurrentWriter []*CurrentWriterView `` /* 164-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) SetSession ¶
func (*Input) SetWriterKeys ¶
func (input *Input) SetWriterKeys(value []WriterKeysRow)
type Lifecycle ¶
type Lifecycle struct{}
Lifecycle customizes role Input.Session.
func (*Lifecycle) AfterQueue ¶
func (*Lifecycle) AfterSequence ¶
type Output ¶
type Output struct {
Data []*Session `parameter:"Data,kind=output,in=body,dataType=[]*Session" json:"data,omitempty"`
}
Output is the generated output scaffold for writer.
type Session ¶
type Session struct {
ShouldDelete bool `sqlx:"-" writer:"delete" json:"shouldDelete,omitempty"`
Id string `sqlx:"id,primaryKey" json:"id,omitempty"`
UserId string `sqlx:"user_id,required=true" json:"userId,omitempty"`
Provider string `sqlx:"provider,required=true" json:"provider,omitempty"`
CreatedAt time.Time `format:"2006-01-02 15:04:05" sqlx:"created_at,required=true" json:"createdAt,omitempty"`
UpdatedAt *time.Time `format:"2006-01-02 15:04:05" sqlx:"updated_at" json:"updatedAt,omitempty"`
ExpiresAt time.Time `format:"2006-01-02 15:04:05" sqlx:"expires_at,required=true" json:"expiresAt,omitempty"`
Has *SessionHas `setMarker:"true" format:"-" sqlx:"-" diff:"-" json:"-" typeName:"SessionHas"`
}
Session is generated canonical view metadata for writer.
func (*Session) GetCreatedAt ¶
func (*Session) GetExpiresAt ¶
func (*Session) GetProvider ¶
func (*Session) GetShouldDelete ¶
func (*Session) GetUpdatedAt ¶
func (*Session) SetCreatedAt ¶
func (*Session) SetExpiresAt ¶
func (*Session) SetProvider ¶
func (*Session) SetShouldDelete ¶
func (*Session) SetUpdatedAt ¶
type SessionHas ¶
type WriterComponent ¶
type WriterComponent struct {
Contract xdatly.Component[Input, Output] "" /* 169-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 WriterHandlerCurrentWriterGroupedByCreatedAt ¶
type WriterHandlerCurrentWriterGroupedByCreatedAt map[time.Time][]*CurrentWriterView
type WriterHandlerCurrentWriterGroupedByExpiresAt ¶
type WriterHandlerCurrentWriterGroupedByExpiresAt map[time.Time][]*CurrentWriterView
type WriterHandlerCurrentWriterGroupedById ¶
type WriterHandlerCurrentWriterGroupedById map[string][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedById) Has ¶
func (index WriterHandlerCurrentWriterGroupedById) Has(key string) bool
type WriterHandlerCurrentWriterGroupedByProvider ¶
type WriterHandlerCurrentWriterGroupedByProvider map[string][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedByProvider) Has ¶
func (index WriterHandlerCurrentWriterGroupedByProvider) Has(key string) bool
type WriterHandlerCurrentWriterGroupedByUpdatedAt ¶
type WriterHandlerCurrentWriterGroupedByUpdatedAt map[time.Time][]*CurrentWriterView
type WriterHandlerCurrentWriterGroupedByUserId ¶
type WriterHandlerCurrentWriterGroupedByUserId map[string][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedByUserId) Has ¶
func (index WriterHandlerCurrentWriterGroupedByUserId) Has(key string) bool
type WriterHandlerCurrentWriterIndexedByCreatedAt ¶
type WriterHandlerCurrentWriterIndexedByCreatedAt map[time.Time]*CurrentWriterView
type WriterHandlerCurrentWriterIndexedByExpiresAt ¶
type WriterHandlerCurrentWriterIndexedByExpiresAt map[time.Time]*CurrentWriterView
type WriterHandlerCurrentWriterIndexedById ¶
type WriterHandlerCurrentWriterIndexedById map[string]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedById) Has ¶
func (index WriterHandlerCurrentWriterIndexedById) Has(key string) bool
type WriterHandlerCurrentWriterIndexedByProvider ¶
type WriterHandlerCurrentWriterIndexedByProvider map[string]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedByProvider) Has ¶
func (index WriterHandlerCurrentWriterIndexedByProvider) Has(key string) bool
type WriterHandlerCurrentWriterIndexedByUpdatedAt ¶
type WriterHandlerCurrentWriterIndexedByUpdatedAt map[time.Time]*CurrentWriterView
type WriterHandlerCurrentWriterIndexedByUserId ¶
type WriterHandlerCurrentWriterIndexedByUserId map[string]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedByUserId) Has ¶
func (index WriterHandlerCurrentWriterIndexedByUserId) Has(key string) bool
type WriterHandlerCurrentWriterSlice ¶
type WriterHandlerCurrentWriterSlice []*CurrentWriterView
func (WriterHandlerCurrentWriterSlice) GroupByCreatedAt ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByCreatedAt() WriterHandlerCurrentWriterGroupedByCreatedAt
func (WriterHandlerCurrentWriterSlice) GroupByExpiresAt ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByExpiresAt() WriterHandlerCurrentWriterGroupedByExpiresAt
func (WriterHandlerCurrentWriterSlice) GroupById ¶
func (rows WriterHandlerCurrentWriterSlice) GroupById() WriterHandlerCurrentWriterGroupedById
func (WriterHandlerCurrentWriterSlice) GroupByProvider ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByProvider() WriterHandlerCurrentWriterGroupedByProvider
func (WriterHandlerCurrentWriterSlice) GroupByUpdatedAt ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByUpdatedAt() WriterHandlerCurrentWriterGroupedByUpdatedAt
func (WriterHandlerCurrentWriterSlice) GroupByUserId ¶
func (rows WriterHandlerCurrentWriterSlice) GroupByUserId() WriterHandlerCurrentWriterGroupedByUserId
func (WriterHandlerCurrentWriterSlice) IndexByCreatedAt ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByCreatedAt() (WriterHandlerCurrentWriterIndexedByCreatedAt, error)
func (WriterHandlerCurrentWriterSlice) IndexByExpiresAt ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByExpiresAt() (WriterHandlerCurrentWriterIndexedByExpiresAt, error)
func (WriterHandlerCurrentWriterSlice) IndexById ¶
func (rows WriterHandlerCurrentWriterSlice) IndexById() (WriterHandlerCurrentWriterIndexedById, error)
func (WriterHandlerCurrentWriterSlice) IndexByProvider ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByProvider() (WriterHandlerCurrentWriterIndexedByProvider, error)
func (WriterHandlerCurrentWriterSlice) IndexByUpdatedAt ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByUpdatedAt() (WriterHandlerCurrentWriterIndexedByUpdatedAt, error)
func (WriterHandlerCurrentWriterSlice) IndexByUserId ¶
func (rows WriterHandlerCurrentWriterSlice) IndexByUserId() (WriterHandlerCurrentWriterIndexedByUserId, 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.