restapi

package
v3.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const AuthTypeBasic = "basic"
View Source
const AuthTypeBearer = "bearer"
View Source
const AuthTypeSalesforceOauth = "SalesforceOauth"

Variables

This section is empty.

Functions

func NewRestAPISource

func NewRestAPISource(sourceConfig personnel_sync.SourceConfig) (personnel_sync.Source, error)

NewRestAPISource unmarshals the sourceConfig's ExtraJson into a restApi struct

Types

type RestAPI

type RestAPI struct {
	Method               string
	BaseURL              string
	Paths                []string
	ResultsJSONContainer string
	AuthType             string
	Username             string
	Password             string
	ClientID             string
	ClientSecret         string
	CompareAttribute     string
}

func (*RestAPI) ForSet

func (r *RestAPI) ForSet(syncSetJson json.RawMessage) error

ForSet sets this RestAPI structs Path value to the one in the umarshalled syncSetJson. It ensures the resulting Path attribute includes an initial "/"

func (*RestAPI) ListUsers

func (r *RestAPI) ListUsers(desiredAttrs []string) ([]personnel_sync.Person, error)

type SalesforceAuthResponse

type SalesforceAuthResponse struct {
	ID          string `json:"id"`
	IssuedAt    string `json:"issued_at"`
	InstanceURL string `json:"instance_url"`
	Signature   string `json:"signature"`
	AccessToken string `json:"access_token"`
}

type SetConfig

type SetConfig struct {
	Paths []string
}

Jump to

Keyboard shortcuts

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