objectstorage

package
v0.0.0-...-c079d71 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorageAccountEndpoint string = "http://localhost:8084/"
)

Variables

This section is empty.

Functions

func Provider

func Provider() terraform.ResourceProvider

func Update

func Update(d *schema.ResourceData, m interface{}, element string) error

func UpdateValue

func UpdateValue(d *schema.ResourceData, m interface{}, element string) error

Types

type Account

type Account struct {
	Source      string `json:"source,omitempty"`
	Group       string `json:"group,omitempty"`
	AskId       string `json:"askId,omitempty"`
	Description string `json:"description,omitempty"`
}

type AccountResponse

type AccountResponse struct {
	Id string `json:"id,omitempty"`
	Account
	NoOfBuckets int `json:"noOfBuckets,omitempty"`
	NoOfObjects int `json:"noOfObjects,omitempty"`
}

type Client

type Client struct {
	Username    string
	Password    string
	AccessToken string
	HTTPClient  *http.Client
}

func (*Client) AuthenticateIfRequire

func (c *Client) AuthenticateIfRequire() error

func (*Client) Delete

func (c *Client) Delete(endpoint string) (*http.Response, error)

func (*Client) Do

func (c *Client) Do(method, endpoint string, payload *bytes.Buffer) (*http.Response, error)

func (*Client) Get

func (c *Client) Get(endpoint string) (*http.Response, error)

func (*Client) Post

func (c *Client) Post(endpoint string, jsonpayload *bytes.Buffer) (*http.Response, error)

func (*Client) Put

func (c *Client) Put(endpoint string, jsonpayload *bytes.Buffer) (*http.Response, error)

func (*Client) PutOnly

func (c *Client) PutOnly(endpoint string) (*http.Response, error)

type Error

type Error struct {
	APIError struct {
		Message string `json:"message,omitempty"`
	}
	StatusCode int
	Endpoint   string
}

func (Error) Error

func (e Error) Error() string

type TokenRequest

type TokenRequest struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

type TokenResponse

type TokenResponse struct {
	Token string `json:"token,omitempty"`
}

type UpdateElement

type UpdateElement struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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