Documentation ¶
Overview ¶
Package mongo implements Mserv MongoDB storage.
Index ¶
- Variables
- type Config
- type MgoStoreConf
- type Store
- func (m *Store) CreateMW(ctx context.Context, mw *storage.MW) (string, error)
- func (m *Store) DeleteMW(ctx context.Context, id string) error
- func (m *Store) GetAllActive(ctx context.Context) ([]*storage.MW, error)
- func (m *Store) GetMWByAPIID(ctx context.Context, apiID string) (*storage.MW, error)
- func (m *Store) GetMWByID(ctx context.Context, id string) (*storage.MW, error)
- func (m *Store) GetTag() string
- func (m *Store) Health() map[string]interface{}
- func (m *Store) Init() error
- func (m *Store) InitMservStore(_ context.Context, tag string) error
- func (m *Store) SetTag(tag string)
- func (m *Store) UpdateMW(ctx context.Context, mw *storage.MW) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyUID is returned when middleware UID is empty. ErrEmptyUID = errors.New("UID cannot be empty") // ErrNotFound is returned when middleware is not found. ErrNotFound = errors.New("middleware not found") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
MongoStore map[string]*MgoStoreConf
}
type MgoStoreConf ¶
type MgoStoreConf struct {
ConnStr string
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) GetAllActive ¶
GetAllActive returns all active middleware from the store.
func (*Store) GetMWByAPIID ¶
GetMWByAPIID gets middleware from the store based on its API ID.
func (*Store) InitMservStore ¶
InitMservStore initializes Mserv storage.
Click to show internal directories.
Click to hide internal directories.