gobaclient

package module
v0.0.0-...-636df6d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2021 License: MIT Imports: 9 Imported by: 1

README

gobaclient

Documentation

Index

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.

func GetImage

func GetImage(uri url.URL, creds Credentials, typ goba.DatabaseType, name string) (image *goba.Image, err error)

GetImage retrieves the image with the given type and name 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.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL