ports

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ErrWrongMetaFormat = lib.Error("wrong meta format")

Variables

View Source
var ErrRecordNotFound = gorm.ErrRecordNotFound

Functions

This section is empty.

Types

type ArtifactStorage

type ArtifactStorage interface {
	NewArtifact(src FS, input string, artifacts []string, storage string, artifactID models.ArtifactID) (*NewArtifactInfo, error)
	OpenFile(storage string, artifactID models.ArtifactID, filename string) (File, error)
	RemoveArtifact(storage string, artifactID models.ArtifactID) error
}

type CheckedFiles

type CheckedFiles struct {
	Good []string
	Bad  []string
}

type ChecksumAlgo

type ChecksumAlgo interface {
	// Shall return checksum of given file or error
	Sum(fs FS, fileName string) ([]byte, error)
	// CheckFiles return list of good files, list of bad files as specified by checksumFileName
	// or first error. Files must be returned with abs path
	CheckFiles(fs FS, checksumFileName string) (CheckedFiles, error)
}

type DB

type DB = *gorm.DB

type Event

type Event = []string

type EventBus

type EventBus interface {
	Shutdown()
	Pub(Topic, Event)
	Sub(Topic) chan Event
	Unsub(chan Event)
}

type FS

type FS = afero.Fs

type File

type File = afero.File

type Limit

type Limit int

type LimitArtifacts

type LimitArtifacts int

type Logger

type Logger = *slog.Logger

type MetaAlgo

type MetaAlgo interface {
	ParseMetaFile(fs FS, metaFileName string) (map[string]string, error)
}

type NewArtifactInfo

type NewArtifactInfo struct {
	Size      int64
	CreatedAt int64
}

type Router

type Router = chi.Router

type Topic

type Topic = string
const (
	TopicRepoUpdated          Topic = "repo-updated"
	TopicArtifactUpdated      Topic = "artifact-updated"
	TopicInputUpdated         Topic = "input-updated"
	TopicInputFileModified    Topic = "input-file-modified"
	TopicDanglingRepoArtifact Topic = "dangling-repo-artifact"
	TopicBrokenRepoArtifact   Topic = "broken-repo-artifact"
)

type WithRelationship

type WithRelationship bool

Jump to

Keyboard shortcuts

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