Documentation
¶
Index ¶
- func ContentSrcBytes(label string, content []byte) func() (_body io.ReadCloser, _length int64, _err error)
- func ContentSrcString(label, content string) func() (_body io.ReadCloser, _length int64, _err error)
- func DigestSha256(content io.Reader) (string, error)
- func FreeLocalhostTcp4Port() (int, error)
- func ImageRepoDirRelUrlSegments(platform *saya.Platform, name string, version string) []string
- func ImageRepoRelUrlSegments(baseDirSegs []string, platform *saya.Platform, name string, version string, ...) ([]string, error)
- func ImgFileName(imgType string) (string, error)
- func LoadConfig(ctx context.Context, endpointSpec *AwsEndpointSpec, ...) (cfg *aws.Config, err error)
- func NewS3Client(endpointSpec *AwsEndpointSpec, credentialsSpec *aws.Credentials, region string) (*s3.Client, error)
- func PersistImgMeta(target io.Writer, imgMeta *saya.ImageTagMetaData) error
- func StubLogCtx() context.Context
- func TransferToS3(ctx context.Context, ftSpec *S3FilesTransferSpec) error
- func WithStubLogCtxLevel(level string)
- type AwsEndpointSpec
- type DummyImg
- type HttpRepo
- func (repo *HttpRepo) AsRepos() *saya.Repos
- func (repo *HttpRepo) Close() error
- func (repo *HttpRepo) GetData(ginCtx *gin.Context)
- func (repo *HttpRepo) NoRoot(ginCtx *gin.Context)
- func (repo *HttpRepo) RegisterDummyImg(img *DummyImg) error
- func (repo *HttpRepo) RepoContent() map[string]string
- func (repo *HttpRepo) RepoUrl(relPath string) string
- func (repo *HttpRepo) Start() error
- type ImgInRepo
- type ImgRegisterer
- type PullImgSpecData
- type RemoteRepos
- type RepoS3
- type S3FilesTransferSpec
- type S3FilesTransferSpecTx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContentSrcBytes ¶
func ContentSrcString ¶
func ContentSrcString(label, content string) func() (_body io.ReadCloser, _length int64, _err error)
func FreeLocalhostTcp4Port ¶
func ImageRepoRelUrlSegments ¶
func ImgFileName ¶
func LoadConfig ¶
func LoadConfig( ctx context.Context, endpointSpec *AwsEndpointSpec, credentialsSpec *aws.Credentials, region string, ) (cfg *aws.Config, err error)
func NewS3Client ¶
func NewS3Client( endpointSpec *AwsEndpointSpec, credentialsSpec *aws.Credentials, region string, ) (*s3.Client, error)
func PersistImgMeta ¶
func PersistImgMeta(target io.Writer, imgMeta *saya.ImageTagMetaData) error
func StubLogCtx ¶
func TransferToS3 ¶
func TransferToS3(ctx context.Context, ftSpec *S3FilesTransferSpec) error
func WithStubLogCtxLevel ¶
func WithStubLogCtxLevel(level string)
Types ¶
type AwsEndpointSpec ¶
type AwsEndpointSpec struct { // default endpoint url Url string //revive:disable-line:var-naming // endpoint url to use when interaction with s3 service S3Url string //revive:disable-line:var-naming // endpoint url to use when interacting with the ec2 service Ec2Url string //revive:disable-line:var-naming }
type DummyImg ¶
type DummyImg struct { BasicAuth *saya.AuthHttpBasic UrlPath string // contains filtered or unexported fields }
func NewDummyImg ¶
func NewDummyImg( img []byte, withMeta bool, pullSpecData PullImgSpecData, basicAuth *saya.AuthHttpBasic, ) (*DummyImg, error)
func (*DummyImg) MetaDataAsBytes ¶
type HttpRepo ¶
type HttpRepo struct {
// contains filtered or unexported fields
}
func NewDummyHttpRepo ¶
func NewDummyHttpRepo() *HttpRepo
func (*HttpRepo) RegisterDummyImg ¶
func (*HttpRepo) RepoContent ¶
type ImgInRepo ¶
func GivenImgInRemoteRepo ¶
func (*ImgInRepo) HasHttpRepo ¶
func (*ImgInRepo) HasS3RepoCredentials ¶
type ImgRegisterer ¶
type PullImgSpecData ¶
type RemoteRepos ¶
func (*RemoteRepos) Close ¶
func (drs *RemoteRepos) Close() error
func (*RemoteRepos) GivenHttpRepoStarted ¶
func (drs *RemoteRepos) GivenHttpRepoStarted() error
func (*RemoteRepos) GivenS3RepoStarted ¶
func (drs *RemoteRepos) GivenS3RepoStarted() error
type RepoS3 ¶
type RepoS3 struct {
// contains filtered or unexported fields
}
func (*RepoS3) RegisterDummyImg ¶
type S3FilesTransferSpec ¶
type S3FilesTransferSpec struct { Endpoint *AwsEndpointSpec Credentials *aws.Credentials Region string Tx []S3FilesTransferSpecTx }
type S3FilesTransferSpecTx ¶
Click to show internal directories.
Click to hide internal directories.