Documentation ¶
Index ¶
- func Connect(ctx context.Context, p *Params) (*mongo.Client, error)
- type Channel
- func (c Channel) All(ctx context.Context) ([]are_hub.Channel, error)
- func (c Channel) Count(ctx context.Context) (int64, error)
- func (c Channel) DeleteID(ctx context.Context, id string) (*are_hub.Channel, error)
- func (c Channel) FindID(ctx context.Context, id string) (*are_hub.Channel, error)
- func (c Channel) Insert(ctx context.Context, ptr are_hub.Archetype) error
- func (c Channel) UpdateID(ctx context.Context, hex string, ptr are_hub.Archetype) error
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Implements are_hub.ChannelRepo.
func NewChannelCollection ¶
Create a channels collection in db.
type Params ¶
type Params struct { // Name of the mongodb user to authenticate with. User string // Password of the said user. Password string // Authentication mechanism. Eg. "SCRAM-SHA-256", "MONGODB-X509". Mechanism string // Address (host + port). Eg. "localhost:27017". Address string // Name of the database. Name string }
MongoDB connection parameters.
Click to show internal directories.
Click to hide internal directories.