nexus

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assets

type Assets struct {
	Items []struct {
		DownloadURL string `json:"downloadUrl"`
		Path        string `json:"path"`
		ID          string `json:"id"`
		Repository  string `json:"repository"`
		Format      string `json:"format"`
		Checksum    struct {
			Sha1   string `json:"sha1"`
			Sha512 string `json:"sha512"`
			Sha256 string `json:"sha256"`
			Md5    string `json:"md5"`
		} `json:"checksum"`
		ContentType    string    `json:"contentType"`
		LastModified   time.Time `json:"lastModified"`
		LastDownloaded time.Time `json:"lastDownloaded"`
		Uploader       string    `json:"uploader"`
		UploaderIP     string    `json:"uploaderIp"`
		FileSize       int       `json:"fileSize"`
		BlobCreated    time.Time `json:"blobCreated"`
	} `json:"items"`
	ContinuationToken interface{} `json:"continuationToken"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func CreateClient

func CreateClient() *Client

func (*Client) DownloadAssets

func (n *Client) DownloadAssets(assets *Assets, targetDirectoryPath string) error

func (*Client) GetAssets

func (n *Client) GetAssets(repository string) (*Assets, error)

func (*Client) MigrateAssets

func (n *Client) MigrateAssets(assets *Assets, targetRepository string) error

func (*Client) UploadAssets

func (n *Client) UploadAssets(assetsList map[string]string, targetRepository string) error

type Credentials

type Credentials struct {
	// contains filtered or unexported fields
}

type HTTPClient

type HTTPClient struct {
	// contains filtered or unexported fields
}

func (*HTTPClient) Copy

func (c *HTTPClient) Copy(sourceURL string, targetURL string) error

func (*HTTPClient) Download

func (c *HTTPClient) Download(sourceURL string, targetFilePath string) (int64, error)

func (*HTTPClient) GetJSON

func (c *HTTPClient) GetJSON(url string, response interface{}) error

func (*HTTPClient) Upload

func (c *HTTPClient) Upload(targetURL string, sourceFilePath string) error

Jump to

Keyboard shortcuts

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