Documentation
¶
Index ¶
- Constants
- func ArtifactID(uri string) (string, error)
- func ArtifactURI(id string) string
- func RegisterProvider()
- func ResolveRootURI(ctx context.Context, template string) (string, string, error)
- type AppendInput
- type AppendOutput
- type ArtifactDescriptor
- type Entry
- type FetchInput
- type FetchOutput
- type ListInput
- type ListOutput
- type MemorizeInput
- type MemorizeOutput
- type Option
- type Service
- func (s *Service) DescribeArtifact(ctx context.Context, uri string) (*ArtifactDescriptor, error)
- func (s *Service) ListArtifacts(ctx context.Context, cursor string, limit int) ([]*ArtifactDescriptor, string, error)
- func (s *Service) Method(name string) (svc.Executable, error)
- func (s *Service) Methods() svc.Signatures
- func (s *Service) Name() string
- func (s *Service) OpenArtifact(ctx context.Context, uri string) (*ArtifactDescriptor, io.ReadCloser, error)
- func (s *Service) PublishArtifact(ctx context.Context, id, name, mime, sourceURI string, body io.Reader) (*ArtifactDescriptor, error)
Constants ¶
View Source
const ( Name = "scratchpad" EnvScratchpadURI = "AGENTLY_SCRATCHPAD_URI" DefaultRootURITemplate = afsscratchpad.DefaultRootURITemplate )
View Source
const MaxArtifactBytes int64 = 64 << 20
Variables ¶
This section is empty.
Functions ¶
func ArtifactID ¶ added in v0.1.39
func ArtifactURI ¶ added in v0.1.39
func RegisterProvider ¶ added in v0.1.39
func RegisterProvider()
RegisterProvider initializes AFS once per runtime, never with a fixed user.
Types ¶
type AppendInput ¶
type AppendInput = afsscratchpad.AppendInput
type AppendOutput ¶
type AppendOutput = afsscratchpad.AppendOutput
type ArtifactDescriptor ¶ added in v0.1.39
type ArtifactDescriptor struct {
URI string `json:"uri"`
ID string `json:"id"`
Name string `json:"name"`
MimeType string `json:"mimeType"`
SizeBytes int64 `json:"sizeBytes"`
SHA256 string `json:"sha256,omitempty"`
SourceURI string `json:"sourceURI,omitempty"`
}
ArtifactDescriptor is public resource metadata, never a backing storage URL.
type Entry ¶
type Entry = afsscratchpad.Entry
type FetchInput ¶
type FetchInput = afsscratchpad.FetchInput
type FetchOutput ¶
type FetchOutput = afsscratchpad.FetchOutput
type ListInput ¶
type ListInput = afsscratchpad.ListInput
type ListOutput ¶
type ListOutput = afsscratchpad.ListOutput
type MemorizeInput ¶
type MemorizeInput = afsscratchpad.MemorizeInput
type MemorizeOutput ¶
type MemorizeOutput = afsscratchpad.MemorizeOutput
type Option ¶
type Option func(*Service)
func WithArtifactClient ¶ added in v0.1.39
func WithArtifactClient(client *afsscratchpad.Service, fs afs.Service) Option
WithArtifactClient reuses an already configured trusted publisher (reporting).
func WithRootURI ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) DescribeArtifact ¶ added in v0.1.39
func (*Service) ListArtifacts ¶ added in v0.1.39
func (s *Service) ListArtifacts(ctx context.Context, cursor string, limit int) ([]*ArtifactDescriptor, string, error)
ListArtifacts returns user-owned public descriptors in stable ID order. cursor is the last returned id, not a filesystem path.
func (*Service) Methods ¶
func (s *Service) Methods() svc.Signatures
func (*Service) OpenArtifact ¶ added in v0.1.39
func (s *Service) OpenArtifact(ctx context.Context, uri string) (*ArtifactDescriptor, io.ReadCloser, error)
func (*Service) PublishArtifact ¶ added in v0.1.39
func (s *Service) PublishArtifact(ctx context.Context, id, name, mime, sourceURI string, body io.Reader) (*ArtifactDescriptor, error)
PublishArtifact writes immutable bytes before exposing the private manifest. A repeated id is accepted only for identical content. IDs should be unique across producers; the lock coordinates publication in this process.
Click to show internal directories.
Click to hide internal directories.