mserv

package
v0.0.0-...-806114d Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleData

type BundleData struct {
	Id string `json:"bundle_id"`
}

BundleData is the data returned by the BundlePush() method

type BundlePushParams

type BundlePushParams struct {
	// APIID is an optional parameter that specifies the API ID to associate the bundle with.
	APIID *string
	// StoreOnly is an optional parameter that specifies if the bundle should be stored without processing.
	// TODO: This does not appear to actually do anything. Verify and remove.
	StoreOnly *bool
	// UploadFile is the zip file to upload
	UploadFile io.ReadCloser
	// ProgressWriter is an optional parameter that specifies a writer to write progress to. This is used by the CLI to
	// display a progress bar during upload.
	ProgressWriter io.Writer
}

BundlePushParams is used to pass request parameters to the BundlePush() method

type Client

type Client struct {

	// InsecureSkipVerify is a flag that specifies if we should validate the
	// server's TLS certificate.
	InsecureSkipVerify bool
	// contains filtered or unexported fields
}

Client manages the connection to mserv

func NewMservClient

func NewMservClient(url, secret string) (*Client, error)

NewMservClient creates a new mserv client.

func (*Client) BundlePush

func (c *Client) BundlePush(params *BundlePushParams) (*BundleData, error)

BundlePush uploads a bundle file to mserv

type Payload

type Payload struct {
	Error   string      `json:"Error,omitempty"`
	Payload interface{} `json:"Payload,omitempty"`
	Status  string      `json:"Status,omitempty"`
}

Payload is the API response payload from mserv

Jump to

Keyboard shortcuts

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