auditlogstore

package
v0.0.0-...-8223eb1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsulKV

type ConsulKV interface {
	List(prefix string, opts *api.QueryOptions) (api.KVPairs, *api.QueryMeta, error)
}

type ConsulStore

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

ConsulStore is responsible for storage and retrieval of AuditLog JSON objects. It operates a little differently than the other consul store types in this project because the creation of an audit record is always expected to be a part of a transaction. As a result, it doesn't actually need access to a consul client to create records, it will simply save them to a transaction object.

func NewConsulStore

func NewConsulStore(consulKV ConsulKV) ConsulStore

func (ConsulStore) Create

func (ConsulStore) Create(
	ctx context.Context,
	eventType audit.EventType,
	eventDetails json.RawMessage,
) error

func (ConsulStore) Delete

func (ConsulStore) Delete(
	ctx context.Context,
	id audit.ID,
) error

func (ConsulStore) List

func (c ConsulStore) List() (map[audit.ID]audit.AuditLog, error)

Jump to

Keyboard shortcuts

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