read

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PayloadURI = "/v2/api/agently/payload"

Functions

func DefineComponent

func DefineComponent(ctx context.Context, srv *datly.Service) error

Types

type Has

type Has struct {
	TenantID bool
	Id       bool
	Ids      bool
	Kind     bool
	Digest   bool
	Storage  bool
	MimeType bool
	Since    bool
}

type Input

type Input struct {
	TenantID string     `parameter:",kind=path,in=tenantId" predicate:"in,group=0,p,tenant_id"`
	Id       string     `parameter:",kind=query,in=id" predicate:"in,group=0,p,id"`
	Ids      []string   `parameter:",kind=query,in=ids" predicate:"in,group=0,p,id"`
	Kind     string     `parameter:",kind=query,in=kind" predicate:"in,group=0,p,kind"`
	Digest   string     `parameter:",kind=query,in=digest" predicate:"in,group=0,p,digest"`
	Storage  string     `parameter:",kind=query,in=storage" predicate:"in,group=0,p,storage"`
	MimeType string     `parameter:",kind=query,in=mime_type" predicate:"in,group=0,p,mime_type"`
	Since    *time.Time `parameter:",kind=query,in=since" predicate:"greater_or_equal,group=0,p,created_at"`
	Has      *Has       `setMarker:"true" format:"-" sqlx:"-" diff:"-" json:"-"`
}

func (*Input) EmbedFS

func (i *Input) EmbedFS() *embed.FS

type InputOption

type InputOption func(*Input)

func WithDigest

func WithDigest(d string) InputOption

func WithID

func WithID(id string) InputOption

func WithIDs

func WithIDs(ids ...string) InputOption

func WithInput

func WithInput(src Input) InputOption

func WithKind

func WithKind(kind string) InputOption

func WithMimeType

func WithMimeType(m string) InputOption

func WithSince

func WithSince(ts time.Time) InputOption

func WithStorage

func WithStorage(s string) InputOption

func WithTenantID

func WithTenantID(id string) InputOption

type Output

type Output struct {
	response.Status `parameter:",kind=output,in=status" json:",omitempty"`
	Data            []*PayloadView   `parameter:",kind=output,in=view" view:"payload,batch=10000,relationalConcurrency=1" sql:"uri=sql/payload.sql"`
	Metrics         response.Metrics `parameter:",kind=output,in=metrics"`
}

type PayloadView

type PayloadView struct {
	Id                     string     `sqlx:"id"`
	TenantID               *string    `sqlx:"tenant_id"`
	Kind                   string     `sqlx:"kind"`
	Subtype                *string    `sqlx:"subtype"`
	MimeType               string     `sqlx:"mime_type"`
	SizeBytes              int        `sqlx:"size_bytes"`
	Digest                 *string    `sqlx:"digest"`
	Storage                string     `sqlx:"storage"`
	InlineBody             *[]byte    `sqlx:"inline_body"`
	URI                    *string    `sqlx:"uri"`
	Compression            string     `sqlx:"compression"`
	EncryptionKMSKeyID     *string    `sqlx:"encryption_kms_key_id"`
	RedactionPolicyVersion *string    `sqlx:"redaction_policy_version"`
	Redacted               *int       `sqlx:"redacted"`
	CreatedAt              *time.Time `sqlx:"created_at"`
	SchemaRef              *string    `sqlx:"schema_ref"`
}

func (*PayloadView) OnFetch

func (p *PayloadView) OnFetch(ctx context.Context) error

Jump to

Keyboard shortcuts

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