jobs

package
v0.7.7-beta.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(
	logger log.Logger,
	grantService grantService,
	providerService providerService,
	notifier notifiers.Client,
	crypto crypto,
	validator *validator.Validate,
) *handler

Types

type Config added in v0.7.4

type Config map[string]interface{}

Config is a map of job-specific configuration

func (Config) Decode added in v0.7.4

func (c Config) Decode(v interface{}) error

type GrantDormancyCheckConfig added in v0.7.5

type GrantDormancyCheckConfig struct {
	DryRun         bool   `mapstructure:"dry_run"`
	Period         string `mapstructure:"period"`
	RetainGrantFor string `mapstructure:"retain_grant_for"`
}

type Job added in v0.7.4

type Job struct {
	Type Type
	// Enabled is set as true for backward compatibility. If the job needs to be disabled, it must be present in the config with this value as false.
	Enabled  bool   `mapstructure:"enabled" default:"true"`
	Interval string `mapstructure:"interval"`
	Config   Config `mapstructure:"config"`
}

type RevokeGrantsByUserCriteriaConfig added in v0.7.4

type RevokeGrantsByUserCriteriaConfig struct {
	IAM                 domain.IAMConfig     `mapstructure:"iam"`
	UserCriteria        evaluator.Expression `mapstructure:"user_criteria"`
	ReassignOwnershipTo evaluator.Expression `mapstructure:"reassign_ownership_to"`
	DryRun              bool                 `mapstructure:"dry_run"`
}

type Type added in v0.7.4

type Type string
const (
	TypeFetchResources             Type = "fetch_resources"
	TypeExpiringGrantNotification  Type = "expiring_grant_notification"
	TypeRevokeExpiredGrants        Type = "revoke_expired_grants"
	TypeRevokeGrantsByUserCriteria Type = "revoke_grants_by_user_criteria"
	TypeGrantDormancyCheck         Type = "grant_dormancy_check"

	// Deprecated: use RevokeExpiredGrants instead
	TypeRevokeExpiredAccess Type = "revoke_expired_access"
	// Deprecated: use ExpiringGrantNotification instead
	TypeExpiringAccessNotification Type = "expiring_access_notification"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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