cloudinit

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*ClientConfig
}

Client stores the client config and implements CloudConfiger

func NewClient

func NewClient(useGzipCompression bool, useBase64Encoding bool, base64Boundary string) *Client

NewClient creates a new client

func (*Client) Base64Boundary

func (c *Client) Base64Boundary() string

Base64Boundary is the base64 boundary that will be used

func (*Client) UseBase64Encoding

func (c *Client) UseBase64Encoding() bool

UseBase64Encoding indicates if base64 encoding will be used

func (*Client) UseGzipCompression

func (c *Client) UseGzipCompression() bool

UseGzipCompression indicates if gzip compression will be used

type ClientConfig

type ClientConfig struct {
	Base64Boundary     string
	UseGzipCompression bool
	UseBase64Encoding  bool
	Parts              []model.PartReader
}

ClientConfig defines the properties needed to encode parts as multi-part mime

func (*ClientConfig) AppendPart

func (c *ClientConfig) AppendPart(content, filename, contentType, mergeType string)

AppendPart appends a new part to the client config

func (*ClientConfig) GetParts

func (c *ClientConfig) GetParts() []model.PartReader

GetParts returns the parts of the client config

Jump to

Keyboard shortcuts

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