artifact

package
v1.0.1246 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InlineArtifact

func InlineArtifact(info os.FileInfo) *models.Artifact

InlineFileInfo returns the underlying artifact with inline content set. Used by blobStore to persist the artifact with content.

Types

type BlobStore

type BlobStore interface {
	Write(data Data, artifact *models.Artifact) (*models.Artifact, error)
	Read(artifactID uuid.UUID) (*Data, error)
	io.Closer
}

func NewBlobStore

func NewBlobStore(fs FilesystemRW, db *gorm.DB, backend string) BlobStore

func NewLoggedBlobStore

func NewLoggedBlobStore(inner BlobStore, log logger.Logger, backend string) BlobStore

type Data

type Data struct {
	Content       io.ReadCloser
	ContentLength int64
	Checksum      string
	ContentType   string
	Filename      string
}

func (Data) Pretty

func (d Data) Pretty() api.Text

type FileInfo

type FileInfo interface {
	os.FileInfo
	FullPath() string
}

type FilesystemRW

type FilesystemRW interface {
	io.Closer
	Read(ctx gocontext.Context, path string) (io.ReadCloser, error)
	Write(ctx gocontext.Context, path string, data io.Reader) (os.FileInfo, error)
	ReadDir(name string) ([]FileInfo, error)
	Stat(name string) (os.FileInfo, error)
}

type InlineStore

type InlineStore struct {
	// contains filtered or unexported fields
}

func NewInlineStore

func NewInlineStore(db *gorm.DB) *InlineStore

func (*InlineStore) Close

func (s *InlineStore) Close() error

func (*InlineStore) Read

func (s *InlineStore) Read(_ gocontext.Context, path string) (io.ReadCloser, error)

func (*InlineStore) ReadDir

func (s *InlineStore) ReadDir(name string) ([]FileInfo, error)

func (*InlineStore) Stat

func (s *InlineStore) Stat(name string) (os.FileInfo, error)

func (*InlineStore) WithCompression

func (s *InlineStore) WithCompression(compression string) *InlineStore

func (*InlineStore) WithMaxSize

func (s *InlineStore) WithMaxSize(maxSize int) *InlineStore

func (*InlineStore) Write

func (s *InlineStore) Write(_ gocontext.Context, path string, data io.Reader) (os.FileInfo, error)

type LoggedBlobStore

type LoggedBlobStore struct {
	// contains filtered or unexported fields
}

LoggedBlobStore wraps a BlobStore with structured logging.

func (*LoggedBlobStore) Close

func (l *LoggedBlobStore) Close() error

func (*LoggedBlobStore) Read

func (l *LoggedBlobStore) Read(artifactID uuid.UUID) (*Data, error)

func (*LoggedBlobStore) Write

func (l *LoggedBlobStore) Write(data Data, a *models.Artifact) (*models.Artifact, error)

type LoggedFS

type LoggedFS struct {
	// contains filtered or unexported fields
}

LoggedFS wraps a FilesystemRW with structured logging (used by e2e tests).

func NewLoggedFS

func NewLoggedFS(inner FilesystemRW, log logger.Logger, backend string) *LoggedFS

func (*LoggedFS) Close

func (l *LoggedFS) Close() error

func (*LoggedFS) Read

func (l *LoggedFS) Read(ctx gocontext.Context, path string) (io.ReadCloser, error)

func (*LoggedFS) ReadDir

func (l *LoggedFS) ReadDir(name string) ([]FileInfo, error)

func (*LoggedFS) Stat

func (l *LoggedFS) Stat(name string) (os.FileInfo, error)

func (*LoggedFS) Write

func (l *LoggedFS) Write(ctx gocontext.Context, path string, data io.Reader) (os.FileInfo, error)

Directories

Path Synopsis
clients
aws
gcp
smb

Jump to

Keyboard shortcuts

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