Documentation
¶
Index ¶
- func ApplyImage(uri url.URL, creds Credentials, typ goba.DatabaseType, name string) error
- func CreateImage(uri url.URL, creds Credentials, typ goba.DatabaseType) (image *goba.Image, err error)
- func DeleteImage(uri url.URL, creds Credentials, typ goba.DatabaseType, name string) error
- func GetAllImages(uri url.URL, creds Credentials, typ goba.DatabaseType) (images []goba.Image, err error)
- func GetImage(uri url.URL, creds Credentials, typ goba.DatabaseType, name string) (image *goba.Image, err error)
- type Credentials
- type ErrorResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyImage ¶
func ApplyImage(uri url.URL, creds Credentials, typ goba.DatabaseType, name string) error
ApplyImage sends a request to apply the image with the given type and name to the database with the given type to the server at the specified url.
func CreateImage ¶
func CreateImage(uri url.URL, creds Credentials, typ goba.DatabaseType) (image *goba.Image, err error)
CreateImage sends a request to create an image with the given type to the server at the specified url.
func DeleteImage ¶
func DeleteImage(uri url.URL, creds Credentials, typ goba.DatabaseType, name string) error
DeleteImage sends a request to delete the image with the given type and name to the server at the specified url.
func GetAllImages ¶
func GetAllImages(uri url.URL, creds Credentials, typ goba.DatabaseType) (images []goba.Image, err error)
GetAllImages retrieves all images with the given type from the server at the specified url.
Types ¶
type Credentials ¶
type Credentials struct {
// Username is the Credentials' password.
Username string `json:"username,omitempty"`
// Password is the Credentials' password.
Password string `json:"password,omitempty"`
}
Credentials represent the client's credentials.
type ErrorResponse ¶
type ErrorResponse struct {
Error error `json:"error,omitempty"`
}
ErrorResponse represents the server's response to a failed request.
func (*ErrorResponse) UnmarshalJSON ¶
func (resp *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals data into resp.
Click to show internal directories.
Click to hide internal directories.