Documentation ¶
Index ¶
- Constants
- func GetFileName(packageName string) string
- func URLJoin(repoUrl, fileName string) string
- type AppVersions
- type Err
- type HttpInterface
- func (i *HttpInterface) CheckFile(ctx context.Context, filename string) (bool, error)
- func (i *HttpInterface) CheckRead(ctx context.Context) error
- func (i *HttpInterface) CheckWrite(ctx context.Context) error
- func (i *HttpInterface) DeleteFile(ctx context.Context, filename string) error
- func (i *HttpInterface) ReadFile(ctx context.Context, filename string) ([]byte, error)
- func (i *HttpInterface) WriteFile(ctx context.Context, filename string, data []byte) error
- type Reader
- func (r *Reader) AddPackage(ctx context.Context, pkg []byte) error
- func (r *Reader) DeletePackage(ctx context.Context, appName, version string) error
- func (r *Reader) GetAppVersions(ctx context.Context) (AppVersions, error)
- func (r *Reader) GetIndex(ctx context.Context) (wrapper.IndexInterface, error)
- func (r *Reader) LoadPackage(ctx context.Context, pkg []byte) (wrapper.VersionInterface, error)
- type RepoInterface
- type S3Credential
- type S3Interface
- func (i *S3Interface) CheckFile(ctx context.Context, filename string) (bool, error)
- func (i *S3Interface) CheckRead(ctx context.Context) error
- func (i *S3Interface) CheckWrite(ctx context.Context) error
- func (i *S3Interface) DeleteFile(ctx context.Context, filename string) error
- func (i *S3Interface) ReadFile(ctx context.Context, filename string) ([]byte, error)
- func (i *S3Interface) WriteFile(ctx context.Context, filename string, data []byte) error
- type Versions
Constants ¶
View Source
const IndexYaml = "index.yaml"
Variables ¶
This section is empty.
Functions ¶
func GetFileName ¶
Types ¶
type AppVersions ¶
type Err ¶
type Err error
var ( ErrParseUrlFailed Err = fmt.Errorf("parse url failed") ErrDecodeJsonFailed Err = fmt.Errorf("decode json failed") ErrEmptyAccessKeyId Err = fmt.Errorf("access key id is empty") ErrEmptySecretAccessKey Err = fmt.Errorf("secret access key is empty") ErrSchemeNotMatched Err = fmt.Errorf("scheme not matched") ErrInvalidType Err = fmt.Errorf("invalid repo type") ErrWriteIsUnsupported Err = fmt.Errorf("write is unsupported") )
type HttpInterface ¶
type HttpInterface struct {
// contains filtered or unexported fields
}
func NewHttpInterface ¶
func (*HttpInterface) CheckWrite ¶
func (i *HttpInterface) CheckWrite(ctx context.Context) error
func (*HttpInterface) DeleteFile ¶
func (i *HttpInterface) DeleteFile(ctx context.Context, filename string) error
type Reader ¶
type Reader struct { RepoInterface // contains filtered or unexported fields }
func (*Reader) DeletePackage ¶
func (*Reader) GetAppVersions ¶
func (r *Reader) GetAppVersions(ctx context.Context) (AppVersions, error)
func (*Reader) LoadPackage ¶
type RepoInterface ¶
type RepoInterface interface { CheckFile(ctx context.Context, filename string) (bool, error) ReadFile(ctx context.Context, filename string) ([]byte, error) WriteFile(ctx context.Context, filename string, data []byte) error DeleteFile(ctx context.Context, filename string) error CheckRead(ctx context.Context) error CheckWrite(ctx context.Context) error }
type S3Credential ¶
type S3Interface ¶
type S3Interface struct {
// contains filtered or unexported fields
}
func NewS3Interface ¶
func (*S3Interface) CheckWrite ¶
func (i *S3Interface) CheckWrite(ctx context.Context) error
func (*S3Interface) DeleteFile ¶
func (i *S3Interface) DeleteFile(ctx context.Context, filename string) error
Click to show internal directories.
Click to hide internal directories.