package
3.1.0+incompatible
Repository: https://github.com/mem/singularity.git
Documentation: pkg.go.dev
# Functions
BsonUTCNow returns a time.Time in UTC, with the precision supported by BSON.
DownloadImage will retrieve an image from the Container Library, saving it into the specified file.
GetImage returns the Image object if exists, otherwise returns error.
IDInSlice returns true if ID is present in the slice.
ImageHash returns the appropriate hash for a provided image file e.g.
IsImageHash returns true if the provided string is valid as a unique hash for an image.
IsLibraryPullRef returns true if the provided string is a valid library reference for a pull operation.
IsLibraryPushRef returns true if the provided string is a valid library reference for a push operation.
IsRefPart returns true if the provided string is valid as a component of a library URI (i.e.
ParseErrorBody - Parse an API format error out of the body.
ParseErrorResponse - Create a JSONResponse out of a raw HTTP response.
PrettyPrint - Debug helper, print nice json for any interface.
SearchLibrary will search the library for a given query and display results.
SliceWithoutID returns slice with specified ID removed.
StringInSlice returns true if string is present in the slice.
UploadImage will push a specified image up to the Container Library,.
# Variables
LibraryModels lists names of valid models in the database.
# Structs
BaseModel - has an ID, soft deletion marker, and Audit struct.
Blob - Binary data object (e.g.
Collection - Second level in the library, holds a collection of containers.
CollectionResponse - Response from the API for an Collection request.
Container - Third level of library.
ContainerResponse - Response from the API for an Container request.
Entity - Top level entry in the library, contains collections of images for a user or group.
EntityResponse - Response from the API for an Entity request.
Image - Represents a Singularity image held by the library for a particular Container.
ImageResponse - Response from the API for an Image request.
ImageTag - A single mapping from a string to bson ID.
JSONError - Struct for standard error returns over REST API.
JSONResponse - Top level container of a REST API response.
SearchResponse - Response from the API for a search request.
SearchResults - Results structure for searches.
TagsResponse - Response from the API for a tags request.
# Interfaces
ModelManager - Generic interface for models which must have a bson ObjectID.
# Type aliases
TagMap - A map of tags to imageIDs for a container.