Documentation
¶
Index ¶
- Variables
- type AuthIf
- type Details
- type HttpResp
- type KeyProfile
- type Profile
- func (p *Profile) Auth(s *grequests.Session) (map[string]string, error)
- func (p *Profile) AuthAndPostData(uri, method, contentType string, params map[string]string, data []byte) (string, error)
- func (p *Profile) AuthAndPostMultipartFile(uri, fileLocation, fileKeyName string) (string, error)
- func (p *Profile) AuthAndPostMultipartFiles(uri string, files, fileKeys []string, valuesPath string) (string, error)
- func (p *Profile) AuthAndRequest(uri, method string, payload interface{}) (string, error)
- func (p *Profile) AuthAndRequestFullResponse(uri, method string, payload interface{}) (*grequests.Response, error)
- func (p *Profile) AuthAndRequestWithHeadersFullResponse(uri, method string, payload interface{}, additionHeaders map[string]string) (*grequests.Response, error)
- func (p *Profile) PostRequestFromFile(uri, filename string) (string, error)
- func (p *Profile) Request(uri, method string, payload interface{}, yamlResp bool) (string, error)
- func (p *Profile) RequestFromFile(uri, method, filename string) (string, error)
- func (p *Profile) SendRequest(s *grequests.Session, uri, method string, ro *grequests.RequestOptions) (*grequests.Response, error)
- func (p *Profile) SubProfile() AuthIf
- type Profiles
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ResourceNotExists = errors.New("resource does not exist") OperationNotAllowed = errors.New("operation not allowed") InvalidCredentials = errors.New("invalid credentials") )
error types
Functions ¶
This section is empty.
Types ¶
type AuthIf ¶
type AuthIf interface { Auth(s *grequests.Session) (map[string]string, error) SendRequest(s *grequests.Session, uri, method string, ro *grequests.RequestOptions) (*grequests.Response, error) }
Common interface for the subclasses, key, session and null.
type KeyProfile ¶
func (*KeyProfile) SendRequest ¶
func (p *KeyProfile) SendRequest(s *grequests.Session, uri, method string, ro *grequests.RequestOptions) (*grequests.Response, error)
type Profile ¶
type Profile struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` Key string `json:"key,omitempty"` Secret string `json:"secret,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` SkipServerCertValid bool `json:"skip_server_cert_check,omitempty"` }
func (*Profile) AuthAndPostData ¶
func (*Profile) AuthAndPostMultipartFile ¶
func (*Profile) AuthAndPostMultipartFiles ¶
func (*Profile) AuthAndRequest ¶
func (*Profile) AuthAndRequestFullResponse ¶
func (*Profile) AuthAndRequestWithHeadersFullResponse ¶
func (*Profile) PostRequestFromFile ¶
func (*Profile) RequestFromFile ¶
func (*Profile) SendRequest ¶
func (*Profile) SubProfile ¶
Click to show internal directories.
Click to hide internal directories.