Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetChecker ¶
type FSCatalog ¶
type FSCatalog struct {
// contains filtered or unexported fields
}
FSCatalog is an implementation of the Catalog interface. It is responsible for fetching assets held by a Private CA from the local filesystem.
func NewFSCatalog ¶
func NewFSCatalog(uri uriapi.FSURI, alias string, checker AssetChecker) *FSCatalog
func (*FSCatalog) Fetch ¶
Use the os package to open the file with the provided file path and return the content of the file as a byte slice.
func (*FSCatalog) WithLogger ¶
type FetchError ¶
type FetchError struct {
// contains filtered or unexported fields
}
FetchError is used to represent an error that occurs when fetching a data fails.
func (FetchError) Error ¶
func (e FetchError) Error() string
type GitHubCatalog ¶
type GitHubCatalog struct {
// contains filtered or unexported fields
}
GitHubCatalog is an implementation of the Catalog interface. It is responsible for fetching assets held by a Private CA from a GitHub repository. It uses the GitHub Get Repository Content API for this purpose.
func NewGitHubCatalog ¶
func NewGitHubCatalog(uri uriapi.GitHubURI, alias string, checker AssetChecker) *GitHubCatalog
func (*GitHubCatalog) Fetch ¶
func (g *GitHubCatalog) Fetch(ctx context.Context) ([]byte, error)
The Fetch function utilizes the Get repository content API in GitHub. It requires the usage of an environment variable called "GITHUB_TOKEN" to authorize the request. The function then returns the content of the file as a byte slice.
func (*GitHubCatalog) WithLogger ¶
func (g *GitHubCatalog) WithLogger(l Logger) *GitHubCatalog
type S3Catalog ¶
type S3Catalog struct {
// contains filtered or unexported fields
}
S3Catalog is an implementation of the Catalog interface. It is responsible for fetching assets held by a Private CA from a AWS S3. It uses the AWS S3 GetObject API for this purpose.
func NewS3Catalog ¶
func NewS3Catalog(uri uriapi.S3URI, alias string, checker AssetChecker) *S3Catalog
func (*S3Catalog) Fetch ¶
The Fetch function utilizes the GetObjcet API in AWS S3. It requires the usage of an environment variable "AWS_ACCESS_KEY_ID" and "AWS_SECRET_ACCESS_KEY", "AWS_DEFAULT_REGION", to authorize the request. The function then returns the content of the file as a byte slice.