package
Version:
v0.17.0
Opens a new window with list of versions in this module.
Published: Jun 10, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
¶
func HandleHTTPStatus(statusCode int) error
type Cacher interface {
Cache(resource string, content []byte) (err error)
}
Cacher is an interface that saves the res object to a data source
type Config struct {
Username string `yaml:"username"`
Token string `yaml:"token"`
CacheLocation string `yaml:"cachelocation"`
FsType string `yaml:"fstype"`
ImportRegex string `yaml:"importregex"`
Proxy string `yaml:"proxy"`
}
const (
UnknownError Error = iota
BadRequestError
ApiRateLimitError
BadReferenceError
InternalError
UnauthorizedError
TimeoutError
CacheAccessError
CacheReadError
ProxyReadError
DownstreamError
CacheWriteError
FileNotFoundError
FileReadError
GitCloneError
GitCheckoutError
GithubFetchError
)
Gopper is the composition of both Retriever and Cacher
type Logger func(format string, args ...interface{})
type Object struct {
Content []byte `json:"content"`
Resource string `json:"resource"`
}
Object ...
type Retriever interface {
Retrieve(resource string) (content []byte, cached bool, err error)
}
Retriever is an interface that returns a Object and if the object should be cached in later steps
Updater is an interface that returns the resolved version of the original resource
Source Files
¶
Click to show internal directories.
Click to hide internal directories.