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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const WriterDatlyResourceNamespace = "reporting_audit_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 WriterHandlerCurrentWriterIndexByActorIdKey

func WriterHandlerCurrentWriterIndexByActorIdKey(value *CurrentWriterView) (string, bool)

func WriterHandlerCurrentWriterIndexByActorRefKey

func WriterHandlerCurrentWriterIndexByActorRefKey(value *CurrentWriterView) (string, bool)

func WriterHandlerCurrentWriterIndexByArtifactIdKey

func WriterHandlerCurrentWriterIndexByArtifactIdKey(value *CurrentWriterView) (string, bool)

func WriterHandlerCurrentWriterIndexByArtifactRefKey

func WriterHandlerCurrentWriterIndexByArtifactRefKey(value *CurrentWriterView) (string, bool)

func WriterHandlerCurrentWriterIndexByEventIdKey

func WriterHandlerCurrentWriterIndexByEventIdKey(value *CurrentWriterView) (string, bool)

func WriterHandlerCurrentWriterIndexByEventTypeKey

func WriterHandlerCurrentWriterIndexByEventTypeKey(value *CurrentWriterView) (string, bool)

func WriterHandlerCurrentWriterIndexByJobIdKey

func WriterHandlerCurrentWriterIndexByJobIdKey(value *CurrentWriterView) (string, bool)

func WriterHandlerCurrentWriterIndexByOccurredAtKey

func WriterHandlerCurrentWriterIndexByOccurredAtKey(value *CurrentWriterView) (time.Time, bool)

func WriterHandlerCurrentWriterIndexByVersionKey

func WriterHandlerCurrentWriterIndexByVersionKey(value *CurrentWriterView) (int64, bool)

Types

type AuditEvent

type AuditEvent struct {
	ShouldDelete bool           `json:"shouldDelete,omitempty" sqlx:"-" writer:"delete"`
	EventId      string         `sqlx:"event_id,primaryKey=true,required=true" json:"eventId,omitempty"`
	EventType    string         `sqlx:"event_type,required=true" json:"eventType,omitempty"`
	ArtifactRef  string         `sqlx:"artifact_ref,required=true" json:"artifactRef,omitempty"`
	Version      int64          `sqlx:"version,required=true" json:"version,omitempty"`
	ActorId      string         `sqlx:"actor_id,required=true" json:"actorId,omitempty"`
	MetadataJson []byte         `sqlx:"metadata_json" json:"metadataJson,omitempty"`
	JobId        *string        `sqlx:"job_id" json:"jobId,omitempty"`
	ArtifactId   *string        `sqlx:"artifact_id" json:"artifactId,omitempty"`
	ActorRef     *string        `sqlx:"actor_ref" json:"actorRef,omitempty"`
	OccurredAt   *time.Time     `sqlx:"occurred_at,required=true" json:"occurredAt,omitempty"`
	Has          *AuditEventHas `setMarker:"true" format:"-" sqlx:"-" diff:"-" json:"-" typeName:"AuditEventHas"`
}

AuditEvent is generated canonical view metadata for writer.

func (*AuditEvent) GetActorId

func (entity *AuditEvent) GetActorId() string

func (*AuditEvent) GetActorRef

func (entity *AuditEvent) GetActorRef() *string

func (*AuditEvent) GetArtifactId

func (entity *AuditEvent) GetArtifactId() *string

func (*AuditEvent) GetArtifactRef

func (entity *AuditEvent) GetArtifactRef() string

func (*AuditEvent) GetEventId

func (entity *AuditEvent) GetEventId() string

func (*AuditEvent) GetEventType

func (entity *AuditEvent) GetEventType() string

func (*AuditEvent) GetJobId

func (entity *AuditEvent) GetJobId() *string

func (*AuditEvent) GetMetadataJson

func (entity *AuditEvent) GetMetadataJson() []byte

func (*AuditEvent) GetOccurredAt

func (entity *AuditEvent) GetOccurredAt() *time.Time

func (*AuditEvent) GetShouldDelete

func (entity *AuditEvent) GetShouldDelete() bool

func (*AuditEvent) GetVersion

func (entity *AuditEvent) GetVersion() int64

func (*AuditEvent) SetActorId

func (entity *AuditEvent) SetActorId(value string)

func (*AuditEvent) SetActorRef

func (entity *AuditEvent) SetActorRef(value *string)

func (*AuditEvent) SetArtifactId

func (entity *AuditEvent) SetArtifactId(value *string)

func (*AuditEvent) SetArtifactRef

func (entity *AuditEvent) SetArtifactRef(value string)

func (*AuditEvent) SetEventId

func (entity *AuditEvent) SetEventId(value string)

func (*AuditEvent) SetEventType

func (entity *AuditEvent) SetEventType(value string)

func (*AuditEvent) SetJobId

func (entity *AuditEvent) SetJobId(value *string)

func (*AuditEvent) SetMetadataJson

func (entity *AuditEvent) SetMetadataJson(value []byte)

func (*AuditEvent) SetOccurredAt

func (entity *AuditEvent) SetOccurredAt(value *time.Time)

func (*AuditEvent) SetShouldDelete

func (entity *AuditEvent) SetShouldDelete(value bool)

func (*AuditEvent) SetVersion

func (entity *AuditEvent) SetVersion(value int64)

type AuditEventHas

type AuditEventHas struct {
	ShouldDelete bool
	EventId      bool
	EventType    bool
	ArtifactRef  bool
	Version      bool
	ActorId      bool
	MetadataJson bool
	JobId        bool
	ArtifactId   bool
	ActorRef     bool
	OccurredAt   bool
}

type CurrentWriterView

type CurrentWriterView struct {
	EventId      string     `sqlx:"event_id,primaryKey=true,required=true" json:"eventId,omitempty"`
	EventType    string     `sqlx:"event_type,required=true" json:"eventType,omitempty"`
	ArtifactRef  string     `sqlx:"artifact_ref,required=true" json:"artifactRef,omitempty"`
	Version      int64      `sqlx:"version,required=true" json:"version,omitempty"`
	ActorId      string     `sqlx:"actor_id,required=true" json:"actorId,omitempty"`
	MetadataJson []byte     `sqlx:"metadata_json" json:"metadataJson,omitempty"`
	JobId        *string    `sqlx:"job_id" json:"jobId,omitempty"`
	ArtifactId   *string    `sqlx:"artifact_id" json:"artifactId,omitempty"`
	ActorRef     *string    `sqlx:"actor_ref" json:"actorRef,omitempty"`
	OccurredAt   *time.Time `sqlx:"occurred_at,required=true" json:"occurredAt,omitempty"`
}

CurrentWriterView is generated canonical view metadata for writer.

type Input

type Input struct {
	Trusted            bool                 `parameter:"Trusted,kind=reportauditaccess,in=internal,dataType=bool,required=true"`
	RetentionDelete    bool                 `parameter:"RetentionDelete,kind=technicalmaintenance,in=deleteAudit,dataType=bool,required=false"`
	RetentionCutoff    time.Time            `` /* 162-byte string literal not displayed */
	ExpectedJobID      string               `` /* 136-byte string literal not displayed */
	ExpectedArtifactID string               `` /* 151-byte string literal not displayed */
	Events             []*AuditEvent        `` /* 234-byte string literal not displayed */
	WriterKeys         []WriterKeysRow      `` /* 132-byte string literal not displayed */
	CurrentWriter      []*CurrentWriterView `` /* 177-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) SetEvents

func (input *Input) SetEvents(value []*AuditEvent)

func (*Input) SetExpectedArtifactID

func (input *Input) SetExpectedArtifactID(value string)

func (*Input) SetExpectedJobID

func (input *Input) SetExpectedJobID(value string)

func (*Input) SetRetentionCutoff

func (input *Input) SetRetentionCutoff(value time.Time)

func (*Input) SetRetentionDelete

func (input *Input) SetRetentionDelete(value bool)

func (*Input) SetTrusted

func (input *Input) SetTrusted(value bool)

func (*Input) SetWriterKeys

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

type InputHas

type InputHas struct {
	Trusted            bool
	RetentionDelete    bool
	RetentionCutoff    bool
	ExpectedJobID      bool
	ExpectedArtifactID bool
	Events             bool
	WriterKeys         bool
	CurrentWriter      bool
}

type Lifecycle

type Lifecycle struct {
	Input *Input `bind:"kind=input"`
}

Lifecycle customizes role Input.Events.

func (*Lifecycle) AfterQueue

func (*Lifecycle) AfterSequence

func (hooks *Lifecycle) AfterSequence(ctx context.Context, entity *AuditEvent, state xhandler.LifecycleContext[AuditEvent, 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 []*AuditEvent `parameter:"Data,kind=output,in=body,dataType=[]*AuditEvent" json:"data"`
}

Output is the generated output scaffold for writer.

type WriterComponent

type WriterComponent struct {
	Contract xdatly.Component[Input, Output] "" /* 175-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 WriterHandlerCurrentWriterGroupedByActorId

type WriterHandlerCurrentWriterGroupedByActorId map[string][]*CurrentWriterView

func (WriterHandlerCurrentWriterGroupedByActorId) Has

type WriterHandlerCurrentWriterGroupedByActorRef

type WriterHandlerCurrentWriterGroupedByActorRef map[string][]*CurrentWriterView

func (WriterHandlerCurrentWriterGroupedByActorRef) Has

type WriterHandlerCurrentWriterGroupedByArtifactId

type WriterHandlerCurrentWriterGroupedByArtifactId map[string][]*CurrentWriterView

func (WriterHandlerCurrentWriterGroupedByArtifactId) Has

type WriterHandlerCurrentWriterGroupedByArtifactRef

type WriterHandlerCurrentWriterGroupedByArtifactRef map[string][]*CurrentWriterView

func (WriterHandlerCurrentWriterGroupedByArtifactRef) Has

type WriterHandlerCurrentWriterGroupedByEventId

type WriterHandlerCurrentWriterGroupedByEventId map[string][]*CurrentWriterView

func (WriterHandlerCurrentWriterGroupedByEventId) Has

type WriterHandlerCurrentWriterGroupedByEventType

type WriterHandlerCurrentWriterGroupedByEventType map[string][]*CurrentWriterView

func (WriterHandlerCurrentWriterGroupedByEventType) Has

type WriterHandlerCurrentWriterGroupedByJobId

type WriterHandlerCurrentWriterGroupedByJobId map[string][]*CurrentWriterView

func (WriterHandlerCurrentWriterGroupedByJobId) Has

type WriterHandlerCurrentWriterGroupedByOccurredAt

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

func (WriterHandlerCurrentWriterGroupedByOccurredAt) Has

type WriterHandlerCurrentWriterGroupedByVersion

type WriterHandlerCurrentWriterGroupedByVersion map[int64][]*CurrentWriterView

func (WriterHandlerCurrentWriterGroupedByVersion) Has

type WriterHandlerCurrentWriterIndexedByActorId

type WriterHandlerCurrentWriterIndexedByActorId map[string]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByActorId) Has

type WriterHandlerCurrentWriterIndexedByActorRef

type WriterHandlerCurrentWriterIndexedByActorRef map[string]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByActorRef) Has

type WriterHandlerCurrentWriterIndexedByArtifactId

type WriterHandlerCurrentWriterIndexedByArtifactId map[string]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByArtifactId) Has

type WriterHandlerCurrentWriterIndexedByArtifactRef

type WriterHandlerCurrentWriterIndexedByArtifactRef map[string]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByArtifactRef) Has

type WriterHandlerCurrentWriterIndexedByEventId

type WriterHandlerCurrentWriterIndexedByEventId map[string]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByEventId) Has

type WriterHandlerCurrentWriterIndexedByEventType

type WriterHandlerCurrentWriterIndexedByEventType map[string]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByEventType) Has

type WriterHandlerCurrentWriterIndexedByJobId

type WriterHandlerCurrentWriterIndexedByJobId map[string]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByJobId) Has

type WriterHandlerCurrentWriterIndexedByOccurredAt

type WriterHandlerCurrentWriterIndexedByOccurredAt map[time.Time]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByOccurredAt) Has

type WriterHandlerCurrentWriterIndexedByVersion

type WriterHandlerCurrentWriterIndexedByVersion map[int64]*CurrentWriterView

func (WriterHandlerCurrentWriterIndexedByVersion) Has

type WriterHandlerCurrentWriterSlice

type WriterHandlerCurrentWriterSlice []*CurrentWriterView

func (WriterHandlerCurrentWriterSlice) GroupByActorId

func (WriterHandlerCurrentWriterSlice) GroupByActorRef

func (WriterHandlerCurrentWriterSlice) GroupByArtifactId

func (WriterHandlerCurrentWriterSlice) GroupByArtifactRef

func (WriterHandlerCurrentWriterSlice) GroupByEventId

func (WriterHandlerCurrentWriterSlice) GroupByEventType

func (WriterHandlerCurrentWriterSlice) GroupByJobId

func (WriterHandlerCurrentWriterSlice) GroupByOccurredAt

func (WriterHandlerCurrentWriterSlice) GroupByVersion

func (WriterHandlerCurrentWriterSlice) IndexByActorId

func (WriterHandlerCurrentWriterSlice) IndexByActorRef

func (WriterHandlerCurrentWriterSlice) IndexByArtifactId

func (WriterHandlerCurrentWriterSlice) IndexByArtifactRef

func (WriterHandlerCurrentWriterSlice) IndexByEventId

func (WriterHandlerCurrentWriterSlice) IndexByEventType

func (WriterHandlerCurrentWriterSlice) IndexByJobId

func (WriterHandlerCurrentWriterSlice) IndexByOccurredAt

func (WriterHandlerCurrentWriterSlice) IndexByVersion

type WriterHandlerReadIndexes

type WriterHandlerReadIndexes struct {
	CurrentWriter          WriterHandlerCurrentWriterSlice
	CurrentWriterByEventId WriterHandlerCurrentWriterIndexedByEventId
}

func BuildWriterHandlerReadIndexes

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

type WriterKeysRow

type WriterKeysRow struct {
	EventId string `sqlx:"event_id"`
}

Jump to

Keyboard shortcuts

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