test

package
v1.32.4 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const CharsetKeyInitial = test.CharsetAlphaNumeric
View Source
const CharsetKeyRemaining = CharsetKeyInitial + "._-"

Variables

This section is empty.

Functions

func RandomKey

func RandomKey() string

func RandomKeySegment

func RandomKeySegment() string

func RandomOptions added in v1.31.0

func RandomOptions() *storeUnstructured.Options

Types

type DeleteOutput

type DeleteOutput struct {
	Deleted bool
	Error   error
}

type ExistsOutput

type ExistsOutput struct {
	Exists bool
	Error  error
}

type GetOutput

type GetOutput struct {
	Reader io.ReadCloser
	Error  error
}

type PutInput

type PutInput struct {
	Key     string
	Reader  io.Reader
	Options *storeUnstructured.Options
}

type Store

type Store struct {
	ExistsInvocations          int
	ExistsInputs               []string
	ExistsStub                 func(ctx context.Context, key string) (bool, error)
	ExistsOutputs              []ExistsOutput
	ExistsOutput               *ExistsOutput
	PutInvocations             int
	PutInputs                  []PutInput
	PutStub                    func(ctx context.Context, key string, reader io.Reader, options *storeUnstructured.Options) error
	PutOutputs                 []error
	PutOutput                  *error
	GetInvocations             int
	GetInputs                  []string
	GetStub                    func(ctx context.Context, key string) (io.ReadCloser, error)
	GetOutputs                 []GetOutput
	GetOutput                  *GetOutput
	DeleteInvocations          int
	DeleteInputs               []string
	DeleteStub                 func(ctx context.Context, key string) (bool, error)
	DeleteOutputs              []DeleteOutput
	DeleteOutput               *DeleteOutput
	DeleteDirectoryInvocations int
	DeleteDirectoryInputs      []string
	DeleteDirectoryStub        func(ctx context.Context, key string) error
	DeleteDirectoryOutputs     []error
	DeleteDirectoryOutput      *error
}

func NewStore

func NewStore() *Store

func (*Store) AssertOutputsEmpty

func (s *Store) AssertOutputsEmpty()

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, key string) (bool, error)

func (*Store) DeleteDirectory added in v1.31.0

func (s *Store) DeleteDirectory(ctx context.Context, key string) error

func (*Store) Exists

func (s *Store) Exists(ctx context.Context, key string) (bool, error)

func (*Store) Get

func (s *Store) Get(ctx context.Context, key string) (io.ReadCloser, error)

func (*Store) Put

func (s *Store) Put(ctx context.Context, key string, reader io.Reader, options *storeUnstructured.Options) error

Jump to

Keyboard shortcuts

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