targetgroupgranter

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventType

type EventType string
const (
	ACTIVATE   EventType = "ACTIVATE"
	DEACTIVATE EventType = "DEACTIVATE"
)

type GrantState

type GrantState struct {
	Grant ahTypes.Grant  `json:"grant"`
	State map[string]any `json:"state"`
}

type Granter

type Granter struct {
	Cfg           config.TargetGroupGranterConfig
	DB            ddb.Storage
	RequestRouter *requestroutersvc.Service
}

func (*Granter) HandleRequest

func (g *Granter) HandleRequest(ctx context.Context, in InputEvent) (GrantState, error)

type InputEvent

type InputEvent struct {
	Action EventType     `json:"action"`
	Grant  ahTypes.Grant `json:"grant"`
	// Will be available for revoke events
	State map[string]any `json:"state,omitempty"`
}

type WorkflowInput

type WorkflowInput struct {
	Grant ahTypes.CreateGrant `json:"grant"`
}

Jump to

Keyboard shortcuts

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