test

package
v1.30.0-dexcom-api-v2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2018 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneSource

func CloneSource(datum *dataSource.Source) *dataSource.Source

func CloneSources

func CloneSources(datum dataSource.Sources) dataSource.Sources

func CloneUpdate

func CloneUpdate(datum *dataSource.Update) *dataSource.Update

func ExpectEqualSource

func ExpectEqualSource(actual *dataSource.Source, expected *dataSource.Source)

func ExpectEqualSources

func ExpectEqualSources(actual dataSource.Sources, expected dataSource.Sources)

func ExpectEqualUpdate

func ExpectEqualUpdate(actual *dataSource.Update, expected *dataSource.Update)

func NewObjectFromCreate

func NewObjectFromCreate(datum *dataSource.Create, objectFormat test.ObjectFormat) map[string]interface{}

func NewObjectFromFilter

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

func NewObjectFromSource

func NewObjectFromSource(datum *dataSource.Source, objectFormat test.ObjectFormat) map[string]interface{}

func NewObjectFromUpdate

func NewObjectFromUpdate(datum *dataSource.Update, objectFormat test.ObjectFormat) map[string]interface{}

func RandomCreate

func RandomCreate() *dataSource.Create

func RandomFilter

func RandomFilter() *dataSource.Filter

func RandomID

func RandomID() string

func RandomSource

func RandomSource() *dataSource.Source

func RandomSources

func RandomSources(minimumLength int, maximumLength int) dataSource.Sources

func RandomState

func RandomState() string

func RandomStates

func RandomStates() []string

func RandomUpdate

func RandomUpdate() *dataSource.Update

Types

type Client

type Client struct {
	ListInvocations   int
	ListInputs        []ListInput
	ListStub          func(ctx context.Context, userID string, filter *dataSource.Filter, pagination *page.Pagination) (dataSource.Sources, error)
	ListOutputs       []ListOutput
	ListOutput        *ListOutput
	CreateInvocations int
	CreateInputs      []CreateInput
	CreateStub        func(ctx context.Context, userID string, create *dataSource.Create) (*dataSource.Source, error)
	CreateOutputs     []CreateOutput
	CreateOutput      *CreateOutput
	GetInvocations    int
	GetInputs         []GetInput
	GetStub           func(ctx context.Context, id string) (*dataSource.Source, error)
	GetOutputs        []GetOutput
	GetOutput         *GetOutput
	UpdateInvocations int
	UpdateInputs      []UpdateInput
	UpdateStub        func(ctx context.Context, id string, condition *request.Condition, create *dataSource.Update) (*dataSource.Source, 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 NewClient

func NewClient() *Client

func (*Client) AssertOutputsEmpty

func (c *Client) AssertOutputsEmpty()

func (*Client) Create

func (c *Client) Create(ctx context.Context, userID string, create *dataSource.Create) (*dataSource.Source, 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) (*dataSource.Source, error)

func (*Client) List

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

func (*Client) Update

func (c *Client) Update(ctx context.Context, id string, condition *request.Condition, update *dataSource.Update) (*dataSource.Source, error)

type CreateInput

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

type CreateOutput

type CreateOutput struct {
	Source *dataSource.Source
	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 {
	Source *dataSource.Source
	Error  error
}

type ListInput

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

type ListOutput

type ListOutput struct {
	Sources dataSource.Sources
	Error   error
}

type UpdateInput

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

type UpdateOutput

type UpdateOutput struct {
	Source *dataSource.Source
	Error  error
}

Jump to

Keyboard shortcuts

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