event_store

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Find(id uint) (event *models.Event, err error)
	List(options ListOptions) (events []models.Event, err error)
	IsCurrentlyAdded(informerName,
		group, version, resource, namespace, name string) (exist bool, err error)
	Save(event *models.Event) (err error)
	SaveSilently(event *models.Event)
}

func New

func New(db *gorm.DB) Interface

type ListOptions

type ListOptions struct {
	InformerName string
	Q            string
	After        uint
}

type Store

type Store struct {
	DB *gorm.DB
}

func (*Store) Find

func (s *Store) Find(id uint) (event *models.Event, err error)

func (*Store) IsCurrentlyAdded

func (s *Store) IsCurrentlyAdded(informerName,
	group, version, resource, namespace, name string) (yes bool, err error)

func (*Store) List

func (s *Store) List(options ListOptions) (events []models.Event, err error)

func (*Store) Save

func (s *Store) Save(event *models.Event) error

func (*Store) SaveSilently

func (s *Store) SaveSilently(event *models.Event)

Jump to

Keyboard shortcuts

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