Documentation ¶
Index ¶
- type BaseAPIResponse
- type BoolResponse
- type GenericMapResponse
- type HttpClientFactory
- type HttpError
- type RestClient
- func (r *RestClient) CallBaseAPI(method string, args map[string]interface{}) (*BaseAPIResponse, error)
- func (r *RestClient) CallBoolAPI(method string, args map[string]interface{}) (*BoolResponse, error)
- func (r *RestClient) CallGenericMapAPI(method string, args map[string]interface{}) (*GenericMapResponse, error)
- func (r *RestClient) CallRawAPI(method string, args map[string]interface{}) ([]byte, error)
- func (r *RestClient) CallStringAPI(method string, args map[string]interface{}) (*StringResponse, error)
- func (r *RestClient) GetLastResponseHeaders() http.Header
- type RestClientMode
- type StringResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseAPIResponse ¶
type BaseAPIResponse struct { Success bool `json:"success"` Result json.RawMessage Message string }
BaseAPIResponse represents the most basic standard Centrify API response,
where Result itself is left as raw json
type BoolResponse ¶
type BoolResponse struct { BaseAPIResponse Result bool }
type GenericMapResponse ¶
type GenericMapResponse struct { BaseAPIResponse Result map[string]interface{} }
GenericMapResponse represents Centrify API responses where results are map[string]interface{},
this type allows direct access to these without further decoding.
type HttpClientFactory ¶
type HttpError ¶
type HttpError struct { StatusCode int // HTTP status // contains filtered or unexported fields }
type RestClient ¶
type RestClient struct { Service string Client *http.Client Headers map[string]string SourceHeader string ResponseHeaders http.Header }
RestClient represents a stateful API client (cookies maintained between calls, single service etc)
func GetNewRestClient ¶
func GetNewRestClient(service string, httpFactory HttpClientFactory) (*RestClient, error)
GetNewRestClient creates a new RestClient for the specified endpoint. If a factory for creating
http.Client's is not provided, you'll get a new: &http.Client{}.
func (*RestClient) CallBaseAPI ¶
func (r *RestClient) CallBaseAPI(method string, args map[string]interface{}) (*BaseAPIResponse, error)
func (*RestClient) CallBoolAPI ¶
func (r *RestClient) CallBoolAPI(method string, args map[string]interface{}) (*BoolResponse, error)
func (*RestClient) CallGenericMapAPI ¶
func (r *RestClient) CallGenericMapAPI(method string, args map[string]interface{}) (*GenericMapResponse, error)
func (*RestClient) CallRawAPI ¶
func (r *RestClient) CallRawAPI(method string, args map[string]interface{}) ([]byte, error)
func (*RestClient) CallStringAPI ¶
func (r *RestClient) CallStringAPI(method string, args map[string]interface{}) (*StringResponse, error)
func (*RestClient) GetLastResponseHeaders ¶
func (r *RestClient) GetLastResponseHeaders() http.Header
GetLastResponseHeaders returns the response headers from last REST call
type RestClientMode ¶
type RestClientMode uint32
BackendType is the type of backend that is being implemented
type StringResponse ¶
type StringResponse struct { BaseAPIResponse Result string }
Click to show internal directories.
Click to hide internal directories.