test

package
v1.29.0-mobile.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneBlob

func CloneBlob(datum *blob.Blob) *blob.Blob

func ExpectEqualBlob

func ExpectEqualBlob(actual *blob.Blob, expected *blob.Blob)

func ExpectEqualBlobs

func ExpectEqualBlobs(actual blob.Blobs, expected blob.Blobs)

func NewObjectFromBlob

func NewObjectFromBlob(datum *blob.Blob, objectFormat test.ObjectFormat) map[string]interface{}

func NewObjectFromFilter

func NewObjectFromFilter(datum *blob.Filter, objectFormat test.ObjectFormat) map[string]interface{}

func RandomBlob

func RandomBlob() *blob.Blob

func RandomBlobs

func RandomBlobs(minimumLength int, maximumLength int) blob.Blobs

func RandomContent

func RandomContent() *blob.Content

func RandomCreate

func RandomCreate() *blob.Create

func RandomFilter

func RandomFilter() *blob.Filter

func RandomID added in v1.29.0

func RandomID() string

func RandomStatuses

func RandomStatuses() []string

Types

type Client

type Client struct {
	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 *blob.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
	GetContentInvocations int
	GetContentInputs      []GetContentInput
	GetContentStub        func(ctx context.Context, id string) (*blob.Content, error)
	GetContentOutputs     []GetContentOutput
	GetContentOutput      *GetContentOutput
	DeleteInvocations     int
	DeleteInputs          []DeleteInput
	DeleteStub            func(ctx context.Context, id string, condition *request.Condition) (bool, error)
	DeleteOutputs         []DeleteOutput
	DeleteOutput          *DeleteOutput
}

func NewClient

func NewClient() *Client

func (*Client) AssertOutputsEmpty

func (c *Client) AssertOutputsEmpty()

func (*Client) Create

func (c *Client) Create(ctx context.Context, userID string, create *blob.Create) (*blob.Blob, error)

func (*Client) Delete

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

func (*Client) Get

func (c *Client) Get(ctx context.Context, id string) (*blob.Blob, error)

func (*Client) GetContent

func (c *Client) GetContent(ctx context.Context, id string) (*blob.Content, error)

func (*Client) List

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

type CreateInput

type CreateInput struct {
	Context context.Context
	UserID  string
	Create  *blob.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 GetContentInput

type GetContentInput struct {
	Context context.Context
	ID      string
}

type GetContentOutput

type GetContentOutput struct {
	Content *blob.Content
	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
}

Jump to

Keyboard shortcuts

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