Documentation
¶
Index ¶
- Constants
- Variables
- func SanitizeTextLog(data []byte) []byte
- type ArtifactStore
- type Metadata
- type S3Config
- type Store
- func (s *Store) Close() error
- func (s *Store) DeleteByRetention(ctx context.Context, orgID string, before time.Time) (int, error)
- func (s *Store) MetadataTx(ctx context.Context, tx pgx.Tx, a domain.Actor, id string) (Metadata, error)
- func (s *Store) Open(ctx context.Context, m Metadata) (io.ReadCloser, error)
- func (s *Store) Prepare(ctx context.Context, m Metadata, input io.Reader) (Metadata, error)
- func (s *Store) PutTx(ctx context.Context, tx pgx.Tx, m Metadata, attemptID string, input io.Reader) (Metadata, error)
- func (s *Store) RecordPreparedTx(ctx context.Context, tx pgx.Tx, m Metadata, attemptID string) (Metadata, error)
- func (s *Store) RemoveBlob(ctx context.Context, org, id string) error
- func (s *Store) Run(ctx context.Context)
- func (s *Store) SweepOrphans(ctx context.Context, before time.Time) (int, error)
Constants ¶
View Source
const MaxSize int64 = 1 << 20
View Source
const MaxTenantSize int64 = 256 << 20
Variables ¶
View Source
var ErrContent = errors.New("artifact content is not permitted")
View Source
var ErrQuota = errors.New("artifact storage limit reached")
Functions ¶
func SanitizeTextLog ¶
Types ¶
type ArtifactStore ¶
type ArtifactStore interface {
PutTenantArtifact(context.Context, Metadata, io.Reader) (Metadata, error)
GetMetadata(context.Context, domain.Actor, string) (Metadata, error)
AuthoriseDownload(context.Context, domain.Actor, string) (io.ReadCloser, error)
DeleteByRetention(context.Context, string, time.Time) (int, error)
}
type Metadata ¶
type Metadata struct {
ID string `json:"id"`
OrgID string `json:"org_id"`
RepositoryID string `json:"repository_id"`
TaskID string `json:"task_id"`
Name string `json:"name"`
MediaType string `json:"media_type"`
Size int64 `json:"size"`
SHA256 string `json:"sha256"`
CreatedAt time.Time `json:"created_at"`
ExpiresAt time.Time `json:"expires_at"`
}
type Store ¶ added in v0.2.24
type Store struct {
// contains filtered or unexported fields
}
func (*Store) DeleteByRetention ¶ added in v0.2.24
func (*Store) MetadataTx ¶ added in v0.2.24
func (*Store) RecordPreparedTx ¶ added in v0.2.24
func (*Store) RemoveBlob ¶ added in v0.2.24
Click to show internal directories.
Click to hide internal directories.