Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) Checker(ctx context.Context, check *health.CheckState) error
- func (c *Client) GetFile(ctx context.Context, path string) (FileMetaData, error)
- func (c *Client) PublishCollection(ctx context.Context, collectionID string) error
- func (c *Client) SetCollectionID(ctx context.Context, filepath, collectionID string) error
- type FileMetaData
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFileNotFound = errors.New("file not found on dp-files-api") ErrFileAlreadyInCollection = errors.New("file collection ID already set") ErrNoFilesInCollection = errors.New("no file in the collection") ErrInvalidState = errors.New("files in an invalid state to publish") ErrNotAuthorized = errors.New("you are not authorized for this action") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an files API client which can be used to make requests to the server. It extends the generic healthcheck Client structure.
func NewAPIClient ¶
NewAPIClient creates a new instance of files Client with a given image API URL
func (*Client) Checker ¶
Checker calls image api health endpoint and returns a check object to the caller.
func (*Client) PublishCollection ¶
type FileMetaData ¶ added in v2.127.0
type FileMetaData struct {
Path string `json:"path"`
IsPublishable bool `json:"is_publishable"`
CollectionID *string `json:"collection_id,omitempty"`
Title string `json:"title"`
SizeInBytes uint64 `json:"size_in_bytes"`
Type string `json:"type"`
Licence string `json:"licence"`
LicenceUrl string `json:"licence_url"`
State string `json:"state"`
Etag string `json:"etag"`
}
Click to show internal directories.
Click to hide internal directories.