mongo

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store client for mongo

func NewMongoStore

func NewMongoStore(mDriver drivers.DB) *Store

NewMongoStore create mongo store

func (*Store) Create

func (s *Store) Create(ctx context.Context, obj *types.RawObject, opt *store.CreateOptions) error

Create create object

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, obj *types.RawObject, opt *store.DeleteOptions) error

Delete delete object

func (*Store) Get

func (s *Store) Get(ctx context.Context, resourceType types.ObjectType, key types.ObjectKey, opt *store.GetOptions) (
	*types.RawObject, error)

Get get object

func (*Store) List

func (s *Store) List(ctx context.Context, objectType types.ObjectType, opts *store.ListOptions) (
	[]*types.RawObject, error)

List list objects

func (*Store) Update

func (s *Store) Update(ctx context.Context, obj *types.RawObject, opt *store.UpdateOptions) error

Update update object

func (*Store) Watch

func (s *Store) Watch(ctx context.Context, resourceType types.ObjectType, opt *store.WatchOptions) (chan *store.Event, error)

Watch object with certain type

Jump to

Keyboard shortcuts

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