Versions in this module Expand all Collapse all v0 v0.3.0 Nov 27, 2026 Changes in this version + var ErrExists = errors.New("file exists with other content") + var ErrNoState = errors.New("the file state KV is not configured") + var ErrNoStore = errors.New("the Object Store is not configured") + var ErrNotFound = errors.New("file not found") + var ErrProtected = errors.New("file is protected") + var Group = endpoint.Register(endpoint.Define("file", "Manage the files in the Object Store", ...)) + func Delete(ctx context.Context, d Deps, in DeleteInput) (struct{}, error) + type DeleteInput struct + Name string + type Deps struct + Objects Objects + States States + type GetInput struct + Name string + type Info struct + ContentType types.ContentType + Name string + Sha256 string + Size int + Source string + type InfoResponse struct + ContentType types.ContentType + Name string + Sha256 string + Size int + func Get(ctx context.Context, d Deps, in GetInput) (InfoResponse, error) + type ListInput struct + type ListResponse struct + Items []Info + TotalItems int + func List(ctx context.Context, d Deps, _ ListInput) (ListResponse, error) + type Objects interface + Delete func(ctx context.Context, name string) error + GetBytes func(ctx context.Context, name string) ([]byte, error) + Info func(ctx context.Context, name string) (*jetstream.ObjectInfo, error) + List func(ctx context.Context) ([]*jetstream.ObjectInfo, error) + Put func(ctx context.Context, meta jetstream.ObjectMeta, r io.Reader) (*jetstream.ObjectInfo, error) + type StaleDeployment struct + CurrentSha string + DeployedAt string + DeployedSha string + Hostname string + ObjectName string + Path string + Provider string + type StaleDeploymentsResponse struct + Items []StaleDeployment + TotalItems int + func Stale(ctx context.Context, d Deps, _ StaleInput) (StaleDeploymentsResponse, error) + type StaleInput struct + type States interface + Get func(ctx context.Context, key string) (jetstream.KeyValueEntry, error) + Keys func(ctx context.Context) ([]string, error) + type UpdateInput struct + ContentType types.ContentType + File []byte + Name string + type UploadInput struct + ContentType types.ContentType + File []byte + Name string + type UploadResponse struct + Changed bool + ContentType types.ContentType + Name string + Sha256 string + Size int + func Update(ctx context.Context, d Deps, in UpdateInput) (UploadResponse, error) + func Upload(ctx context.Context, d Deps, in UploadInput) (UploadResponse, error)