Documentation
¶
Index ¶
- func NewTestSuite(model *suite.Model) (storage.TestSuite, error)
- type ModuleStore
- func (m *ModuleStore) Connect() error
- func (s *ModuleStore) Delete(ctx context.Context, module, version string) error
- func (s *ModuleStore) Exists(ctx context.Context, module, vsn string) bool
- func (s *ModuleStore) Get(ctx context.Context, module, vsn string) (*storage.Version, error)
- func (s *ModuleStore) List(ctx context.Context, module string) ([]string, error)
- func (s *ModuleStore) Save(ctx context.Context, module, version string, mod []byte, zip io.Reader, ...) error
- type TestSuite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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(ctx context.Context, module, version string) error
Delete removes a specific version of a module
func (*ModuleStore) Exists ¶
func (s *ModuleStore) Exists(ctx context.Context, module, vsn string) bool
Exists checks for a specific version of a module
Click to show internal directories.
Click to hide internal directories.