repository

package
v0.0.0-...-35a342c Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateKey = "state"
)

Variables

This section is empty.

Functions

func NewBoltACRepository

func NewBoltACRepository(db *bolt.DB, bucket string) accontrol.Repository

NewBoltACRepository returns instance of the BoltRepository implementing repository interface.

Types

type BoltACRepository

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

BoltACRepository contains reference to BoltDB instance and bucket name

func (*BoltACRepository) GetState

func (b *BoltACRepository) GetState() (models.ACState, error)

GetState returns the state of the system from the repository

func (*BoltACRepository) SetState

func (b *BoltACRepository) SetState(state models.ACState) error

SetState stores the state of the system to the repository

Jump to

Keyboard shortcuts

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