store

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2021 License: Apache-2.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 DynamoStore

type DynamoStore struct {
	TableName    string
	PartitionKey string
	SortKey      string
	// contains filtered or unexported fields
}

DynamoStore is a backend for policies from dynamodb

func NewDynamoStore

func NewDynamoStore(session *session.Session, table string) *DynamoStore

NewDynamoStore creates a new DynamoStore

func (*DynamoStore) Get

func (dynamo *DynamoStore) Get(namespace string, principal string) (interface{}, error)

Get returns policy data from dynamo

type IService

type IService interface {
	Query(input *dynamodb.QueryInput) (*dynamodb.QueryOutput, error)
}

IService is a service interface for the DynamoStore struct. This allows mocking the service

type PolicyStore

type PolicyStore interface {
	Get(namespace string, principal string) (interface{}, error)
}

PolicyStore is an interface type for working with different policy backends

Jump to

Keyboard shortcuts

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