Documentation ¶
Index ¶
- Constants
- type AuthManager
- type BaseManager
- func (m *BaseManager) Delete(subPath string, vs ...interface{}) (*req.Resp, error)
- func (m *BaseManager) Do(method, subPath string, vs ...interface{}) (resp *req.Resp, err error)
- func (m *BaseManager) Get(subPath string, vs ...interface{}) (*req.Resp, error)
- func (m *BaseManager) Head(subPath string, vs ...interface{}) (*req.Resp, error)
- func (m *BaseManager) Patch(subPath string, vs ...interface{}) (*req.Resp, error)
- func (m *BaseManager) Post(subPath string, vs ...interface{}) (*req.Resp, error)
- func (m *BaseManager) Put(subPath string, vs ...interface{}) (*req.Resp, error)
- type Client
Constants ¶
View Source
const ( MethodPassword = "password" MethodToken = "token" DefaultDomain = "default" )
View Source
const (
TokenHeader = "X-Auth-Token"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthManager ¶
type AuthManager struct {
BaseManager
}
func NewAuthManager ¶
func NewAuthManager(client *Client) *AuthManager
func (*AuthManager) AlterScope ¶
func (*AuthManager) Authenticate ¶
func (m *AuthManager) Authenticate(scope interface{}, credential interface{}) (*req.Resp, error)
func (*AuthManager) TokenDetail ¶ added in v0.1.2
func (m *AuthManager) TokenDetail() (*req.Resp, error)
type BaseManager ¶
type BaseManager struct { URLPath string // contains filtered or unexported fields }
func (*BaseManager) Delete ¶
func (m *BaseManager) Delete(subPath string, vs ...interface{}) (*req.Resp, error)
func (*BaseManager) Do ¶
func (m *BaseManager) Do(method, subPath string, vs ...interface{}) (resp *req.Resp, err error)
func (*BaseManager) Get ¶
func (m *BaseManager) Get(subPath string, vs ...interface{}) (*req.Resp, error)
func (*BaseManager) Head ¶
func (m *BaseManager) Head(subPath string, vs ...interface{}) (*req.Resp, error)
func (*BaseManager) Patch ¶
func (m *BaseManager) Patch(subPath string, vs ...interface{}) (*req.Resp, error)
type Client ¶
type Client struct { *req.Req Token string BaseURL *url.URL // Managers Auth *AuthManager // OpenAPI *openapi.APIClient }
func NewClientByToken ¶ added in v0.2.0
func NewClientByToken(config *openapi.Configuration, token string) (*Client, error)
func NewDefaultClient ¶
func NewDefaultClientByToken ¶ added in v0.2.0
func (*Client) AuthRequired ¶
Click to show internal directories.
Click to hide internal directories.