Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultAPIEndpoint is the default endpoint of the ImageSpy API.
DefaultAPIEndpoint = "https://imagespy.hydrantosaurus.com"
)
Variables ¶
View Source
var DefaultRegistryWhitelist = map[string]struct{}{
"index.docker.io": struct{}{},
"docker.io": struct{}{},
"quay.io": struct{}{},
}
Functions ¶
This section is empty.
Types ¶
type ClientV1 ¶
type ClientV1 struct {
ImageSpy *ImageSpyService
// contains filtered or unexported fields
}
ClientV1 is the client for the Image Spy API version 1.
func NewClientV1 ¶
func NewClientV1() *ClientV1
NewClientV1 returns a new client for the V1 HTTP API.
func (*ClientV1) WithBaseURL ¶
WithBaseURL sets the base URL of the ImageSpy API.
func (*ClientV1) WithHTTPClient ¶
WithHTTPClient sets the http.Client.
func (*ClientV1) WithRegistryWhitelist ¶
WithRegistryWhitelist allows specifying the registries to send requests to.
func (*ClientV1) WithTimeout ¶
WithTimeout sets the timeout of the underlying http.Client.
type Image ¶
type Image struct {
Created time.Time `json:"created"`
Digest string `json:"digest"`
Name string `json:"name"`
Tag string `json:"tag"`
}
Image is a Docker image.
type ImageSpy ¶
type ImageSpy struct {
CurrentImage *Image `json:"current_image"`
LatestImage *Image `json:"latest_image"`
Name string `json:"name"`
}
ImageSpy is a ImageSpy.
type ImageSpyService ¶
type ImageSpyService struct {
// contains filtered or unexported fields
}
ImageSpyService handles interactions.
type Logger ¶
type Logger interface {
Debug(args ...interface{})
}
Logger provides logging.
var Log Logger = &NullLogger{}
Log is used by this library to log messages.
Click to show internal directories.
Click to hide internal directories.