client

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Del

func Del(url, cmd, token string, request interface{}) (int, error)

DELETE is used to request the deletion of a resource. Maybe apayload, no response!

func Delete

func Delete(parent, asset string) error

func Get

func Get(url, cmd, token string, response interface{}) (int, error)

Get is used to request data from the API. No payload, only queries!

func Init

func Init(userid, parent string) (*settings.DialSettings, error)

func List

func List(parent string) (*[]metadata.Metadata, error)

List returns a list of media resources on the remote content endpoint.

func Post

func Post(url, cmd, token string, request, response interface{}) (int, error)

Post is used to invoke an API method using http POST

func Put

func Put(url, cmd, token string, request, response interface{}) (int, error)

Put is used to invoke an API method using http PUT

func Sync

func Sync(parent, root string, purge bool) error

Sync synchronizes a local repository against the remote content endpoint. All local resources that are missing on the remote site will be uploaded, already existing ones are ignored. Only media files (e.g. .mp3, .png) are synchronized.

func Upload

func Upload(parent, path string) error

Upload moves a file from the local file system to the CDN. The file is placed in a location specified by parent. The location has to exist beforehand otherwise the API endpoint will return an error.

func UploadRequest

func UploadRequest(url, token, form, path string) (*http.Request, error)

Creates a new file upload http request with optional extra params

Types

This section is empty.

Jump to

Keyboard shortcuts

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