Documentation ¶
Index ¶
- type Response
- type Rest
- func (r *Rest) Delete(link string) (*Response, error)
- func (r *Rest) Get(payload map[string]interface{}, link string) (*Response, error)
- func (r *Rest) GetConfig(key string) string
- func (r *Rest) GetConfigData() map[string]interface{}
- func (r *Rest) GetWithHeader(payload map[string]interface{}, link string, header map[string]string) (*Response, error)
- func (r *Rest) GetWithHeaderNoAuth(payload map[string]interface{}, link string, header map[string]string) (*Response, error)
- func (r *Rest) Post(payload map[string]interface{}, link string) (*Response, error)
- func (r *Rest) PostWithContext(payload map[string]interface{}, link string, ctx context.Context) (*Response, error)
- func (r *Rest) PostWithHeader(payload map[string]interface{}, link string, header map[string]string) (*Response, error)
- func (r *Rest) PostWithHeaderNoAuth(payload map[string]interface{}, link string, header map[string]string) (*Response, error)
- func (r *Rest) SetConfig(key string, value string)
- func (r *Rest) SetToken(token *Token) error
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rest ¶
type Rest struct {
// contains filtered or unexported fields
}
func NewRest ¶
gets a Rest struct with the given config if InsecureSkipVerify is set to true, the client will skip the verification of the server's certificate chain and host name
func (*Rest) GetConfigData ¶
sets variables used in the requests
func (*Rest) GetWithHeader ¶
func (r *Rest) GetWithHeader(payload map[string]interface{}, link string, header map[string]string) (*Response, error)
gets request to the given link, using the defined token and specific header
func (*Rest) GetWithHeaderNoAuth ¶
func (r *Rest) GetWithHeaderNoAuth(payload map[string]interface{}, link string, header map[string]string) (*Response, error)
gets request to the given link, without token and specific header
func (*Rest) PostWithContext ¶
func (r *Rest) PostWithContext(payload map[string]interface{}, link string, ctx context.Context) (*Response, error)
posts request to the given link, using the defined token and context
func (*Rest) PostWithHeader ¶
func (r *Rest) PostWithHeader(payload map[string]interface{}, link string, header map[string]string) (*Response, error)
posts request to the given link, using the defined token and specific header
func (*Rest) PostWithHeaderNoAuth ¶
func (r *Rest) PostWithHeaderNoAuth(payload map[string]interface{}, link string, header map[string]string) (*Response, error)
posts request to the given link, without token and specific header
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
func (*Token) GetValidity ¶
func (*Token) SetValidity ¶
Click to show internal directories.
Click to hide internal directories.