Documentation
¶
Overview ¶
Copyright (c) 2022, SailPoint Technologies, Inc. All rights reserved.
Copyright (c) 2023, SailPoint Technologies, Inc. All rights reserved.
Index ¶
- Constants
- func ParseTime(timeStr string, currentTime time.Time) (time.Time, error)
- type Account
- type AccountCreateTemplate
- type AccountCreateTemplateField
- type AccountSchema
- type AccountSchemaAttribute
- type AttributeChange
- type CommandStats
- type CompoundKey
- type ConnClient
- func (cc *ConnClient) AccountCreate(ctx context.Context, identity *string, attributes map[string]interface{}, ...) (account *Account, raw []byte, err error)
- func (cc *ConnClient) AccountDelete(ctx context.Context, id string, uniqueID string, schema map[string]interface{}) (raw []byte, err error)
- func (cc *ConnClient) AccountDiscoverSchema(ctx context.Context) (accountSchema *AccountSchema, rawResponse []byte, err error)
- func (cc *ConnClient) AccountList(ctx context.Context, stateful *bool, stateId *string, ...) (accounts []Account, state json.RawMessage, printable []byte, err error)
- func (cc *ConnClient) AccountRead(ctx context.Context, id string, uniqueID string, schema map[string]interface{}) (account *Account, rawResponse []byte, err error)
- func (cc *ConnClient) AccountUpdate(ctx context.Context, id string, uniqueID string, changes []AttributeChange, ...) (account *Account, rawResponse []byte, err error)
- func (cc *ConnClient) BuildAccountSchema(spec *ConnSpec) map[string]interface{}
- func (cc *ConnClient) BuildEntitlementSchema(spec *ConnSpec) map[string]interface{}
- func (cc *ConnClient) ChangePassword(ctx context.Context, identity string, uniqueID string, password string) (rawResponse []byte, err error)
- func (cc *ConnClient) EntitlementList(ctx context.Context, t string, stateful *bool, stateId *string, ...) (entitlements []Entitlement, state json.RawMessage, printable []byte, err error)
- func (cc *ConnClient) EntitlementRead(ctx context.Context, id string, uniqueID string, t string, ...) (entitlement *Entitlement, rawResponse []byte, err error)
- func (cc *ConnClient) Invoke(ctx context.Context, cmdType string, input json.RawMessage) (rawResponse []byte, err error)
- func (cc *ConnClient) SourceDataDiscover(ctx context.Context, queryInput map[string]any) (sData []sourceData, raw []byte, err error)
- func (cc *ConnClient) SourceDataRead(ctx context.Context, sourceDataKey string, queryInput map[string]any) (sData []sourceData, raw []byte, err error)
- func (cc *ConnClient) SpecRead(ctx context.Context) (connSpec *ConnSpec, err error)
- func (cc *ConnClient) TestConnection(ctx context.Context) (rawResponse []byte, err error)
- func (cc *ConnClient) TestConnectionWithConfig(ctx context.Context, cfg json.RawMessage) error
- type ConnSpec
- type ConnectorStats
- type Entitlement
- type EntitlementSchema
- type EntitlementSchemaAttribute
- type Key
- type LogEvents
- type LogFilter
- type LogInput
- type LogMessage
- type LogsClient
- type RawResponse
- type ReadSpecOutput
- type SimpleKey
- type TemplateAttributes
- type TemplateInitialValue
- type TenantStats
Constants ¶
const ( ResponseTypeOutput = "output" ResponseTypeState = "state" )
const LogsEndpoint = "/beta/platform-logs/query"
const StatsEndpoint = "/beta/platform-logs/stats"
const TimeFormatLocal = `2006-01-02T15:04:05.000-07:00`
const TimeLocationLocal = "Local"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct { Identity string `json:"identity"` UUID string `json:"uuid"` Key Key `json:"key"` Attributes map[string]interface{} `json:"attributes"` }
Account is an sail connect account. The is used for AccountList, AccountRead and AccountUpdate commands.
type AccountCreateTemplate ¶
type AccountCreateTemplate struct {
Fields []AccountCreateTemplateField `json:"fields"`
}
type AccountCreateTemplateField ¶
type AccountCreateTemplateField struct { // Deprecated Name string `json:"name"` Key string `json:"key"` Type string `json:"type"` Required bool `json:"required"` InitialValue TemplateInitialValue `json:"initialValue"` }
type AccountSchema ¶
type AccountSchema struct { DisplayAttribute string `json:"displayAttribute"` GroupAttribute string `json:"groupAttribute"` IdentityAttribute string `json:"identityAttribute"` Attributes []AccountSchemaAttribute `json:"attributes"` }
type AccountSchemaAttribute ¶
type AccountSchemaAttribute struct { Name string `json:"name"` Type string `json:"type"` Description string `json:"description"` Entitlement bool `json:"entitlement"` Managed bool `json:"managed"` Multi bool `json:"multi"` // Writable is not a standard spec field, yet Writable bool `json:"writable"` }
type AttributeChange ¶
type AttributeChange struct { Op string `json:"op"` Attribute string `json:"attribute"` Value interface{} `json:"value"` }
AttributeChange describes a change to a specific attribute
type CommandStats ¶
type CommandStats struct { CommandType string `json:"commandType"` InvocationCount uint32 `json:"invocationCount"` ErrorCount uint32 `json:"errorCount"` ErrorRate float64 `json:"errorRate"` ElapsedAvg float64 `json:"elapsedAvg"` Elapsed95th float64 `json:"elapsed95th"` }
func (CommandStats) Columns ¶
func (c CommandStats) Columns() []string
type CompoundKey ¶
type ConnClient ¶
type ConnClient struct {
// contains filtered or unexported fields
}
ConnClient is an sail connect client for a specific connector
func NewConnClient ¶
func NewConnClient(client client.Client, version *int, config json.RawMessage, connectorRef string, endpoint string) *ConnClient
NewConnClient returns a client for the provided (connectorID, version, config)
func (*ConnClient) AccountCreate ¶
func (cc *ConnClient) AccountCreate(ctx context.Context, identity *string, attributes map[string]interface{}, schema map[string]interface{}) (account *Account, raw []byte, err error)
AccountCreate creats an account
func (*ConnClient) AccountDelete ¶
func (cc *ConnClient) AccountDelete(ctx context.Context, id string, uniqueID string, schema map[string]interface{}) (raw []byte, err error)
AccountDelete deletes an account
func (*ConnClient) AccountDiscoverSchema ¶
func (cc *ConnClient) AccountDiscoverSchema(ctx context.Context) (accountSchema *AccountSchema, rawResponse []byte, err error)
AccountDiscoverSchema discovers schema for accounts
func (*ConnClient) AccountList ¶
func (cc *ConnClient) AccountList(ctx context.Context, stateful *bool, stateId *string, schema map[string]interface{}) (accounts []Account, state json.RawMessage, printable []byte, err error)
AccountList lists all accounts
func (*ConnClient) AccountRead ¶
func (cc *ConnClient) AccountRead(ctx context.Context, id string, uniqueID string, schema map[string]interface{}) (account *Account, rawResponse []byte, err error)
AccountRead reads a specific account
func (*ConnClient) AccountUpdate ¶
func (cc *ConnClient) AccountUpdate(ctx context.Context, id string, uniqueID string, changes []AttributeChange, schema map[string]interface{}) (account *Account, rawResponse []byte, err error)
AccountUpdate updates an account
func (*ConnClient) BuildAccountSchema ¶
func (cc *ConnClient) BuildAccountSchema(spec *ConnSpec) map[string]interface{}
Builds account schema that is used as cmd input
func (*ConnClient) BuildEntitlementSchema ¶
func (cc *ConnClient) BuildEntitlementSchema(spec *ConnSpec) map[string]interface{}
Builds entitlement schema that is used as cmd input
func (*ConnClient) ChangePassword ¶
func (cc *ConnClient) ChangePassword(ctx context.Context, identity string, uniqueID string, password string) (rawResponse []byte, err error)
ChangePassword runs the std:change-password command
func (*ConnClient) EntitlementList ¶
func (cc *ConnClient) EntitlementList(ctx context.Context, t string, stateful *bool, stateId *string, schema map[string]interface{}) (entitlements []Entitlement, state json.RawMessage, printable []byte, err error)
EntitlementList lists all entitlements
func (*ConnClient) EntitlementRead ¶
func (cc *ConnClient) EntitlementRead(ctx context.Context, id string, uniqueID string, t string, schema map[string]interface{}) (entitlement *Entitlement, rawResponse []byte, err error)
EntitlementRead reads all entitlements
func (*ConnClient) Invoke ¶
func (cc *ConnClient) Invoke(ctx context.Context, cmdType string, input json.RawMessage) (rawResponse []byte, err error)
Invoke allows you to send an arbitrary json payload as a command
func (*ConnClient) SourceDataDiscover ¶
func (*ConnClient) SourceDataRead ¶
func (*ConnClient) SpecRead ¶
func (cc *ConnClient) SpecRead(ctx context.Context) (connSpec *ConnSpec, err error)
SpecRead issues a custom:config command which is expected to return the connector specification. This is an experimental command used by the validation suite.
func (*ConnClient) TestConnection ¶
func (cc *ConnClient) TestConnection(ctx context.Context) (rawResponse []byte, err error)
TestConnection runs the std:test-connection command
func (*ConnClient) TestConnectionWithConfig ¶
func (cc *ConnClient) TestConnectionWithConfig(ctx context.Context, cfg json.RawMessage) error
TestConnectionWithConfig provides a way to run std:test-connection with an arbitrary config
type ConnSpec ¶
type ConnSpec struct { Name string `json:"name"` Commands []string `json:"commands"` AccountCreateTemplate AccountCreateTemplate `json:"accountCreateTemplate"` AccountSchema AccountSchema `json:"accountSchema"` EntitlementSchemas []EntitlementSchema `json:"entitlementSchemas"` }
ConnSpec is a connector config. See ConnConfig method.
type ConnectorStats ¶
type ConnectorStats struct { ConnectorID string `json:"connectorID"` ConnectorAlias string `json:"alias"` Stats []CommandStats `json:"stats"` }
type Entitlement ¶
type Entitlement struct { Identity string `json:"identity"` UUID string `json:"uuid"` Key Key `json:"key"` Attributes map[string]interface{} `json:"attributes"` }
Entitlement is an sail connect entitlement, used for EntitlementList and EntitlementRead
func (*Entitlement) ID ¶
func (a *Entitlement) ID() string
func (*Entitlement) UniqueID ¶
func (a *Entitlement) UniqueID() string
type EntitlementSchema ¶
type EntitlementSchema struct { Type string `json:"type"` DisplayAttribute string `json:"displayAttribute"` IdentityAttribute string `json:"identityAttribute"` HierarchyAttribute string `json:"hierarchyAttribute"` Attributes []EntitlementSchemaAttribute `json:"attributes"` }
type Key ¶
type Key struct { Simple *SimpleKey `json:"simple,omitempty"` Compound *CompoundKey `json:"compound,omitempty"` }
func NewCompoundKey ¶
func NewSimpleKey ¶
type LogEvents ¶
type LogEvents struct { // The token for the next set of items in the forward direction. If you have reached the // end of the stream, it returns the same token you passed in. NextToken *string `json:"nextToken,omitempty"` //The log messages Logs []LogMessage `json:"logs"` }
type LogFilter ¶
type LogFilter struct { StartTime *time.Time `json:"startTime,omitempty"` EndTime *time.Time `json:"endTime,omitempty"` Component string `json:"component,omitempty"` LogLevels []string `json:"logLevels,omitempty"` TargetID string `json:"targetID,omitempty"` TargetName string `json:"targetName,omitempty"` RequestID string `json:"requestID,omitempty"` Event string `json:"event,omitempty"` }
type LogMessage ¶
type LogMessage struct { TenantID string `json:"tenantID"` Timestamp time.Time `json:"timestamp"` Level string `json:"level"` Event string `json:"event"` Component string `json:"component"` TargetID string `json:"targetID"` TargetName string `json:"targetName"` RequestID string `json:"requestID"` Message interface{} `json:"message"` }
func (LogMessage) MessageString ¶
func (l LogMessage) MessageString() string
func (LogMessage) RawString ¶
func (l LogMessage) RawString() string
func (LogMessage) TimestampFormatted ¶
func (l LogMessage) TimestampFormatted() string
type LogsClient ¶
type LogsClient struct {
// contains filtered or unexported fields
}
func NewLogsClient ¶
func NewLogsClient(client client.Client, endpoint string) *LogsClient
NewConnClient returns a client for the provided (connectorID, version, config)
func (*LogsClient) GetStats ¶
func (c *LogsClient) GetStats(ctx context.Context, from time.Time, connectorID string) (*TenantStats, error)
type RawResponse ¶
type RawResponse struct { Type string `json:"type"` Data json.RawMessage `json:"data"` }
RawResponse represents the response format from the connector
type ReadSpecOutput ¶
type ReadSpecOutput struct {
Specification *ConnSpec `json:"specification"`
}
type TemplateAttributes ¶
type TemplateInitialValue ¶
type TemplateInitialValue struct { Type string `json:"type"` Attributes TemplateAttributes `json:"attributes"` }
type TenantStats ¶
type TenantStats struct { TenantID string `json:"tenantID"` ConnectorStats []ConnectorStats `json:"connectors"` }