lowlevel

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrLinkNotFound

type ErrLinkNotFound struct {
	Rel string
}

func (ErrLinkNotFound) Error

func (e ErrLinkNotFound) Error() string

type ErrUnexpectedStatusCode

type ErrUnexpectedStatusCode struct {
	StatusCode int
	Message    string
}

func (ErrUnexpectedStatusCode) Error

func (e ErrUnexpectedStatusCode) Error() string
type Link struct {
	Href   string `json:"href"`
	Rel    string `json:"rel"`
	Method string `json:"method"`
}

func (Link) Delete

func (l Link) Delete(client *SpacesLowlevelClient, result interface{}) error

func (Link) Execute

func (l Link) Execute(client *SpacesLowlevelClient, body interface{}, result interface{}) error

func (Link) Get

func (l Link) Get(client *SpacesLowlevelClient, result interface{}) error

func (Link) GetWithQuery

func (l Link) GetWithQuery(q url.Values, client *SpacesLowlevelClient, result interface{}) error

func (Link) Post

func (l Link) Post(client *SpacesLowlevelClient, body interface{}, result interface{}) error

func (Link) Put

func (l Link) Put(client *SpacesLowlevelClient, body interface{}, result interface{}) error

func (Link) WithParam

func (l Link) WithParam(param, value string) Link
type LinkList []Link

func (LinkList) GetLinkByRel

func (l LinkList) GetLinkByRel(rel string) (*Link, error)
func (l LinkList) HasLink(rel string) bool

type Linkeable

type Linkeable struct {
	Links   LinkList `json:"_links"`
	Actions LinkList `json:"_actions"`
}

type Message

type Message struct {
	Message string      `json:"msg"`
	Error   interface{} `json:"error"`
}

func (Message) String

func (m Message) String() string

type SpacesLowlevelClient

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

func NewSpacesLowlevelClient

func NewSpacesLowlevelClient(token string, endpoint string, logger *log.Logger) (*SpacesLowlevelClient, error)

func (*SpacesLowlevelClient) Delete

func (c *SpacesLowlevelClient) Delete(path string, target interface{}) error

func (*SpacesLowlevelClient) DeleteBody added in v1.10.0

func (c *SpacesLowlevelClient) DeleteBody(path string, body interface{}, target interface{}) error

func (*SpacesLowlevelClient) Get

func (c *SpacesLowlevelClient) Get(path string, target interface{}) error

func (*SpacesLowlevelClient) GetCanonicalURL

func (c *SpacesLowlevelClient) GetCanonicalURL(path string) (string, error)

func (*SpacesLowlevelClient) Post

func (c *SpacesLowlevelClient) Post(path string, body interface{}, target interface{}) error

func (*SpacesLowlevelClient) Put

func (c *SpacesLowlevelClient) Put(path string, body interface{}, target interface{}) error

Jump to

Keyboard shortcuts

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