v0.0.0-...-2f6044c Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


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 {
	Result bool

type GenericMapResponse

type GenericMapResponse struct {
	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 HttpClientFactory func() *http.Client

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

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)

type RestClientMode

type RestClientMode uint32

BackendType is the type of backend that is being implemented

type StringResponse

type StringResponse struct {
	Result string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL