mongo

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModuleStore

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

ModuleStore represents a mongo backed storage backend.

func NewStorage

func NewStorage(url string) *ModuleStore

NewStorage returns an unconnected Mongo backed storage that satisfies the Backend interface. You must call Connect() on the returned store before using it.

func (*ModuleStore) Connect

func (m *ModuleStore) Connect() error

Connect conntect the the newly created mongo backend.

func (*ModuleStore) Delete

func (s *ModuleStore) Delete(module, vsn string) error

Delete removes a specific version of a module

func (*ModuleStore) Exists

func (s *ModuleStore) Exists(module, vsn string) bool

Exists checks for a specific version of a module

func (*ModuleStore) Get

func (s *ModuleStore) Get(module, vsn string) (*storage.Version, error)

Get a specific version of a module

func (*ModuleStore) List

func (s *ModuleStore) List(module string) ([]string, error)

List lists all versions of a module

func (*ModuleStore) Save

func (s *ModuleStore) Save(_ context.Context, module, version string, mod []byte, zip io.Reader, info []byte) error

Save stores a module in mongo storage.

Jump to

Keyboard shortcuts

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