access_decision

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultExpirationDelta uint64 = 100

DefaultExpirationDelta sets the number of blocks a Decision is valid for

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessDecisionRepository

type AccessDecisionRepository struct {
	// contains filtered or unexported fields
}

func NewAccessDecisionRepository

func NewAccessDecisionRepository(store storetypes.KVStore) *AccessDecisionRepository

func (*AccessDecisionRepository) Delete

func (*AccessDecisionRepository) Get

func (*AccessDecisionRepository) List

func (*AccessDecisionRepository) ListIds

func (r *AccessDecisionRepository) ListIds(ctx context.Context) ([]string, error)

func (*AccessDecisionRepository) Set

type EvaluateAccessRequestsCommand

type EvaluateAccessRequestsCommand struct {
	Policy     *types.Policy
	Operations []*types.Operation
	Actor      authtypes.AccountI

	CreationTime *prototypes.Timestamp

	// Creator is the same as the Tx signer
	Creator authtypes.AccountI

	// Current block height
	CurrentHeight uint64
	// contains filtered or unexported fields
}

func (*EvaluateAccessRequestsCommand) Execute

type GogoProtoMarshaler

type GogoProtoMarshaler[T gogoproto.Message] struct {
	// contains filtered or unexported fields
}

func NewGogoProtoMarshaler

func NewGogoProtoMarshaler[T gogoproto.Message](factory func() T) *GogoProtoMarshaler[T]

func (*GogoProtoMarshaler[T]) Marshal

func (m *GogoProtoMarshaler[T]) Marshal(t *T) ([]byte, error)

func (*GogoProtoMarshaler[T]) Unmarshal

func (m *GogoProtoMarshaler[T]) Unmarshal(bytes []byte) (T, error)

type ParamsRepository

type ParamsRepository interface {
	GetDefaults(context.Context) (*types.DecisionParams, error)
}

type Repository

type Repository interface {
	Set(ctx context.Context, decision *types.AccessDecision) error

	Get(ctx context.Context, id string) (*types.AccessDecision, error)

	Delete(ctx context.Context, id string) error

	// List of Ids of all Decisions
	ListIds(ctx context.Context) ([]string, error)

	List(ctx context.Context) ([]*types.AccessDecision, error)
}

type StaticParamsRepository

type StaticParamsRepository struct{}

func (*StaticParamsRepository) GetDefaults

type VerifyAccessRequestCommand

type VerifyAccessRequestCommand struct {
	Policy        *types.Policy
	AccessRequest *types.AccessRequest
}

VerifyAccessRequest verifies whether the given AccessRequest is valid for Policy. An AccessRequest is valid if the Request's Actor is authorized to execute all the Operations within it.

func (*VerifyAccessRequestCommand) Execute

Execute runs the Comand for the given context and engine

Jump to

Keyboard shortcuts

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