Documentation
¶
Overview ¶
Mongo implements the repository.Group interface.
Index ¶
- type MongoRepository
- func (r *MongoRepository) BuildIndexes(ctx context.Context) error
- func (c *MongoRepository) Create(ctx context.Context, project *project.Project) (*project.Project, error)
- func (c *MongoRepository) Delete(ctx context.Context, projectID uuid.UUID) error
- func (c *MongoRepository) Get(ctx context.Context, projectId uuid.UUID) (*project.Project, error)
- func (m *MongoRepository) GetSettings(ctx context.Context, projectID uuid.UUID, settingsName string) ([]byte, error)
- func (r *MongoRepository) List(ctx context.Context, pagination *model.Pagination, exclude []uuid.UUID) (iterator.Iterator[*project.Project], int64, error)
- func (m *MongoRepository) SetSettings(ctx context.Context, projectID uuid.UUID, settingsName string, data []byte) error
- func (r *MongoRepository) Update(ctx context.Context, p *project.Project) (*project.Project, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoRepository ¶
type MongoRepository struct { ProjectCol *mongo.Collection SettingsCol *mongo.Collection }
func NewRepository ¶
func NewRepository(c *mongo.Client) (*MongoRepository, error)
func (*MongoRepository) BuildIndexes ¶
func (r *MongoRepository) BuildIndexes(ctx context.Context) error
BuildIndexes TODO: implement.
func (*MongoRepository) Create ¶
func (c *MongoRepository) Create(ctx context.Context, project *project.Project) (*project.Project, error)
Create inserts a model.Project in the database with default fields and returns the created object.
func (*MongoRepository) GetSettings ¶
func (*MongoRepository) SetSettings ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.