Documentation
¶
Index ¶
- type Config
- type MongoDB
- func (m *MongoDB) Bootstrap() error
- func (m *MongoDB) Create(ctx context.Context, plugin db.Plugin) (db.Plugin, error)
- func (m *MongoDB) CreateHash(ctx context.Context, module, version, hash string) (db.PluginHash, error)
- func (m *MongoDB) Delete(ctx context.Context, id string) error
- func (m *MongoDB) DeleteBlacklist(ctx context.Context, repository string) error
- func (m *MongoDB) Get(ctx context.Context, id string) (db.Plugin, error)
- func (m *MongoDB) GetByName(ctx context.Context, name string, filterDisabled, filterHidden bool) (db.Plugin, error)
- func (m *MongoDB) GetHashByName(ctx context.Context, module, version string) (db.PluginHash, error)
- func (m *MongoDB) List(ctx context.Context, page db.Pagination) ([]db.Plugin, string, error)
- func (m *MongoDB) ListBlacklist(ctx context.Context) ([]db.BlacklistEntry, error)
- func (m *MongoDB) Ping(ctx context.Context) error
- func (m *MongoDB) SearchByName(ctx context.Context, name string, page db.Pagination) ([]db.Plugin, string, error)
- func (m *MongoDB) Update(ctx context.Context, id string, plugin db.Plugin) (db.Plugin, error)
- func (m *MongoDB) UpdateHashVerified(ctx context.Context, module, version, hash string, verified bool) (db.PluginHash, error)
- func (m *MongoDB) UpsertBlacklist(ctx context.Context, entry db.BlacklistEntry) (db.BlacklistEntry, error)
- type MongoIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoDB ¶
type MongoDB struct {
// contains filtered or unexported fields
}
MongoDB is a mongoDB client.
func (*MongoDB) CreateHash ¶
func (m *MongoDB) CreateHash(ctx context.Context, module, version, hash string) (db.PluginHash, error)
CreateHash creates a new plugin hash.
func (*MongoDB) DeleteBlacklist ¶ added in v1.14.0
DeleteBlacklist removes the blacklist entry for the given repository.
func (*MongoDB) GetByName ¶
func (m *MongoDB) GetByName(ctx context.Context, name string, filterDisabled, filterHidden bool) (db.Plugin, error)
GetByName gets the plugin with the given name.
func (*MongoDB) GetHashByName ¶
GetHashByName returns the hash corresponding the given name.
func (*MongoDB) ListBlacklist ¶ added in v1.14.0
ListBlacklist returns all the blacklisted repositories, sorted by repository.
func (*MongoDB) SearchByName ¶
func (m *MongoDB) SearchByName(ctx context.Context, name string, page db.Pagination) ([]db.Plugin, string, error)
SearchByName searches for plugins matching with the given name.
func (*MongoDB) UpdateHashVerified ¶ added in v1.13.2
func (m *MongoDB) UpdateHashVerified(ctx context.Context, module, version, hash string, verified bool) (db.PluginHash, error)
UpdateHashVerified updates the verified value for a plugin hash.
func (*MongoDB) UpsertBlacklist ¶ added in v1.14.0
func (m *MongoDB) UpsertBlacklist(ctx context.Context, entry db.BlacklistEntry) (db.BlacklistEntry, error)
UpsertBlacklist creates or updates a blacklist entry, keyed by repository. CreatedAt is only set on insert.
Click to show internal directories.
Click to hide internal directories.