Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Do(ctx context.Context, req *http.Request, resBody interface{}) error
- func (c *Client) Login(ctx context.Context, user *url.Userinfo) error
- func (c *Client) LoginByToken(ctx context.Context) error
- func (c *Client) Logout(ctx context.Context) error
- func (c *Client) Resource(path string) *Resource
- func (c *Client) Session(ctx context.Context) (*Session, error)
- func (c *Client) WithSigner(ctx context.Context, s Signer) context.Context
- type LocalizableMessage
- type Resource
- type Session
- type Signer
Constants ¶
View Source
const (
Path = "/rest"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client extends soap.Client to support JSON encoding, while inheriting security features, debug tracing and session persistence.
func (*Client) Login ¶
Login creates a new session via Basic Authentication with the given url.Userinfo.
func (*Client) LoginByToken ¶ added in v0.20.0
type LocalizableMessage ¶ added in v0.21.0
type LocalizableMessage struct { Args []string `json:"args,omitempty"` DefaultMessage string `json:"default_message,omitempty"` ID string `json:"id,omitempty"` }
LocalizableMessage represents a localizable error
func (*LocalizableMessage) Error ¶ added in v0.21.0
func (m *LocalizableMessage) Error() string
type Resource ¶ added in v0.22.0
type Resource struct {
// contains filtered or unexported fields
}
Resource wraps url.URL with helpers
func (*Resource) Request ¶ added in v0.22.0
Request returns a new http.Request for the given method. An optional body can be provided for POST and PATCH methods.
func (*Resource) WithAction ¶ added in v0.22.0
WithAction sets adds action to the URL.RawQuery
Click to show internal directories.
Click to hide internal directories.