Documentation ¶
Index ¶
- type AutoIncrementingModel
- type Client
- func (c *Client) Delete(uri string) (status int, response interface{}, err error)
- func (c *Client) DeleteWithTLSClientConfig(uri string, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
- func (c *Client) Get(uri string, params map[string]interface{}) (status int, response interface{}, err error)
- func (c *Client) GetWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
- func (c *Client) Head(uri string, params map[string]interface{}) (status int, response map[string][]string, err error)
- func (c *Client) Patch(uri string, params map[string]interface{}) (status int, response interface{}, err error)
- func (c *Client) PatchWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
- func (c *Client) Post(uri string, params map[string]interface{}) (status int, response interface{}, err error)
- func (c *Client) PostMultipartFormData(uri string, params map[string]interface{}) (status int, response interface{}, err error)
- func (c *Client) PostMultipartFormDataWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
- func (c *Client) PostWWWFormURLEncoded(uri string, params map[string]interface{}) (status int, response interface{}, err error)
- func (c *Client) PostWWWFormURLEncodedWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
- func (c *Client) PostWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
- func (c *Client) Put(uri string, params map[string]interface{}) (status int, response interface{}, err error)
- func (c *Client) PutWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
- type Error
- type IModel
- type Manifest
- type ManifestPackage
- type Model
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoIncrementingModel ¶
type AutoIncrementingModel struct { ID uint `gorm:"primary_key;column:id;default:nextval('accounts_id_seq'::regclass)" json:"id"` CreatedAt time.Time `sql:"not null;default:now()" json:"created_at,omitempty"` Errors []*Error `sql:"-" json:"errors,omitempty"` }
AutoIncrementingModel base class with int primary key
type Client ¶
type Client struct { Host string Path string Scheme string Cookie *string Headers map[string][]string Token *string Username *string Password *string }
Client is a generic base class for calling a REST API; when a token is configured on an Client instance it will be provided as a bearer authorization header; when a username and password are configured on an Client instance, they will be used for HTTP basic authorization but will be passed as the Authorization header instead of as part of the URL itself. When a token is configured on an Client instance, the username and password supplied for basic auth are currently discarded.
func (*Client) DeleteWithTLSClientConfig ¶
func (c *Client) DeleteWithTLSClientConfig(uri string, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
DeleteWithTLSClientConfig constructs and synchronously sends an API DELETE request
func (*Client) Get ¶
func (c *Client) Get(uri string, params map[string]interface{}) (status int, response interface{}, err error)
Get constructs and synchronously sends an API GET request
func (*Client) GetWithTLSClientConfig ¶
func (c *Client) GetWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
GetWithTLSClientConfig constructs and synchronously sends an API GET request
func (*Client) Head ¶
func (c *Client) Head(uri string, params map[string]interface{}) (status int, response map[string][]string, err error)
Head constructs and synchronously sends an API HEAD request; returns the headers
func (*Client) Patch ¶
func (c *Client) Patch(uri string, params map[string]interface{}) (status int, response interface{}, err error)
Patch constructs and synchronously sends an API PATCH request
func (*Client) PatchWithTLSClientConfig ¶
func (c *Client) PatchWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
PatchWithTLSClientConfig constructs and synchronously sends an API PATCH request
func (*Client) Post ¶
func (c *Client) Post(uri string, params map[string]interface{}) (status int, response interface{}, err error)
Post constructs and synchronously sends an API POST request
func (*Client) PostMultipartFormData ¶
func (c *Client) PostMultipartFormData(uri string, params map[string]interface{}) (status int, response interface{}, err error)
PostMultipartFormData constructs and synchronously sends an API POST request using multipart/form-data as the content-type
func (*Client) PostMultipartFormDataWithTLSClientConfig ¶
func (c *Client) PostMultipartFormDataWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
PostMultipartFormDataWithTLSClientConfig constructs and synchronously sends an API POST request using multipart/form-data as the content-type
func (*Client) PostWWWFormURLEncoded ¶
func (c *Client) PostWWWFormURLEncoded(uri string, params map[string]interface{}) (status int, response interface{}, err error)
PostWWWFormURLEncoded constructs and synchronously sends an API POST request using application/x-www-form-urlencoded as the content-type
func (*Client) PostWWWFormURLEncodedWithTLSClientConfig ¶
func (c *Client) PostWWWFormURLEncodedWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
PostWWWFormURLEncodedWithTLSClientConfig constructs and synchronously sends an API POST request using application/x-www-form-urlencoded as the content-type
func (*Client) PostWithTLSClientConfig ¶
func (c *Client) PostWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
PostWithTLSClientConfig constructs and synchronously sends an API POST request
type IModel ¶
IModel interface TODO-- this isn't actually used anywhere... decide if it should be or remove it.
type Manifest ¶
type Manifest struct { Name string `json:"name"` Version string `json:"version"` Repository string `json:"repository"` Packages []*ManifestPackage `json:"packages"` }
Manifest defines the contents of a Provide release