target

package
v0.15.14 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diagnostic

type Diagnostic struct {
	Level   types.LogLevel `json:"level" dynamodbav:"level"`
	Code    string         `json:"code" dynamodbav:"code"`
	Message string         `json:"message" dynamodbav:"message"`
	// Allows diagnostics to be grouped by an arbitrary key, for use in UI
	// This can be set in a response from a provider
	GroupBy *string `json:"groupBy" dynamodbav:"groupBy"`
}

type From

type From struct {
	Publisher string `json:"publisher" dynamodbav:"publisher"`
	Name      string `json:"name" dynamodbav:"name"`
	Version   string `json:"version" dynamodbav:"version"`
	Kind      string `json:"kind" dynamodbav:"kind"`
}

func FromFieldFromAPI

func FromFieldFromAPI(in types.TargetGroupFrom) From

FromFieldFromAPI parses an API type to convert it to the 'From' struct.

func (From) ToAPI

func (f From) ToAPI() types.TargetGroupFrom

func (From) ToAnalytics

func (f From) ToAnalytics() analytics.Provider

type Group

type Group struct {
	//user defined e.g. 'okta'
	ID string `json:"id" dynamodbav:"id"`

	// From is a reference to the provider and kind from the registry
	// that the target group was created from
	From From `json:"from" dynamodbav:"from"`

	// Schema is denomalised and saved here for efficiency
	Schema providerregistrysdk.Target `json:"schema" dynamodbav:"schema"`

	// reference to the SVG icon for the target group
	Icon string `json:"icon" dynamodbav:"icon"`

	CreatedAt time.Time `json:"createdAt" dynamodbav:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt" dynamodbav:"updatedAt"`
}

func TestGroup

func TestGroup(opt ...func(*Group)) Group

TestAccessRule returns an AccessRule fixture to be used in tests.

func (*Group) DDBKeys

func (r *Group) DDBKeys() (ddb.Keys, error)

func (*Group) ToAPI

func (r *Group) ToAPI() types.TargetGroup

type Route

type Route struct {
	Group       string       `json:"group" dynamodbav:"group"`
	Handler     string       `json:"handler" dynamodbav:"handler"`
	Kind        string       `json:"kind" dynamodbav:"kind"`
	Priority    int          `json:"priority" dynamodbav:"priority"`
	Valid       bool         `json:"valid" dynamodbav:"valid"`
	Diagnostics []Diagnostic `json:"diagnostics" dynamodbav:"diagnostics"`
}

func (Route) AddDiagnostic

func (r Route) AddDiagnostic(d Diagnostic) Route

func (*Route) DDBKeys

func (r *Route) DDBKeys() (ddb.Keys, error)

func (Route) SetValidity

func (r Route) SetValidity(v bool) Route

func (*Route) ToAPI

func (r *Route) ToAPI() types.TargetRoute

Jump to

Keyboard shortcuts

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