test

package
v1.30.1-hotfix Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2018 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomCreate

func RandomCreate() *blobStoreStructured.Create

func RandomUpdate

func RandomUpdate() *blobStoreStructured.Update

Types

type CreateInput

type CreateInput struct {
	Context context.Context
	UserID  string
	Create  *blobStoreStructured.Create
}

type CreateOutput

type CreateOutput struct {
	Blob  *blob.Blob
	Error error
}

type DeleteInput

type DeleteInput struct {
	Context   context.Context
	ID        string
	Condition *request.Condition
}

type DeleteOutput

type DeleteOutput struct {
	Deleted bool
	Error   error
}

type GetInput

type GetInput struct {
	Context context.Context
	ID      string
}

type GetOutput

type GetOutput struct {
	Blob  *blob.Blob
	Error error
}

type ListInput

type ListInput struct {
	Context    context.Context
	UserID     string
	Filter     *blob.Filter
	Pagination *page.Pagination
}

type ListOutput

type ListOutput struct {
	Blobs blob.Blobs
	Error error
}

type Session

type Session struct {
	*test.Closer
	ListInvocations   int
	ListInputs        []ListInput
	ListStub          func(ctx context.Context, userID string, filter *blob.Filter, pagination *page.Pagination) (blob.Blobs, error)
	ListOutputs       []ListOutput
	ListOutput        *ListOutput
	CreateInvocations int
	CreateInputs      []CreateInput
	CreateStub        func(ctx context.Context, userID string, create *blobStoreStructured.Create) (*blob.Blob, error)
	CreateOutputs     []CreateOutput
	CreateOutput      *CreateOutput
	GetInvocations    int
	GetInputs         []GetInput
	GetStub           func(ctx context.Context, id string) (*blob.Blob, error)
	GetOutputs        []GetOutput
	GetOutput         *GetOutput
	UpdateInvocations int
	UpdateInputs      []UpdateInput
	UpdateStub        func(ctx context.Context, id string, condition *request.Condition, update *blobStoreStructured.Update) (*blob.Blob, error)
	UpdateOutputs     []UpdateOutput
	UpdateOutput      *UpdateOutput
	DeleteInvocations int
	DeleteInputs      []DeleteInput
	DeleteStub        func(ctx context.Context, id string, condition *request.Condition) (bool, error)
	DeleteOutputs     []DeleteOutput
	DeleteOutput      *DeleteOutput
}

func NewSession

func NewSession() *Session

func (*Session) AssertOutputsEmpty

func (s *Session) AssertOutputsEmpty()

func (*Session) Create

func (s *Session) Create(ctx context.Context, userID string, create *blobStoreStructured.Create) (*blob.Blob, error)

func (*Session) Delete

func (s *Session) Delete(ctx context.Context, id string, condition *request.Condition) (bool, error)

func (*Session) Get

func (s *Session) Get(ctx context.Context, id string) (*blob.Blob, error)

func (*Session) List

func (s *Session) List(ctx context.Context, userID string, filter *blob.Filter, pagination *page.Pagination) (blob.Blobs, error)

func (*Session) Update

func (s *Session) Update(ctx context.Context, id string, condition *request.Condition, update *blobStoreStructured.Update) (*blob.Blob, error)

type Store

type Store struct {
	NewSessionInvocations int
	NewSessionStub        func() blobStoreStructured.Session
	NewSessionOutputs     []blobStoreStructured.Session
	NewSessionOutput      *blobStoreStructured.Session
}

func NewStore

func NewStore() *Store

func (*Store) AssertOutputsEmpty

func (s *Store) AssertOutputsEmpty()

func (*Store) NewSession

func (s *Store) NewSession() blobStoreStructured.Session

type UpdateInput

type UpdateInput struct {
	Context   context.Context
	ID        string
	Condition *request.Condition
	Update    *blobStoreStructured.Update
}

type UpdateOutput

type UpdateOutput struct {
	Blob  *blob.Blob
	Error error
}

Jump to

Keyboard shortcuts

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