db

package
v0.0.33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func CloseDB

func CloseDB()

func InitDB

func InitDB(cfg *config.MongoConfig)

func Mongo

func Mongo() *mongo.Collection

Types

type MockRepo

type MockRepo struct {
}

func NewMockRepo

func NewMockRepo() *MockRepo

func (*MockRepo) All

func (r *MockRepo) All(_ string, _ bool, _ map[string][]string, _ []string) (pipelines lib.PipelinesResponse, err error)

func (*MockRepo) DeletePipeline

func (r *MockRepo) DeletePipeline(_ string, _ string, _ bool) (err error)

func (*MockRepo) FindPipeline

func (r *MockRepo) FindPipeline(_ string, _ string) (pipeline lib.Pipeline, err error)

func (*MockRepo) FlowUsage added in v0.0.33

func (r *MockRepo) FlowUsage(_ string, _ bool, _ map[string][]string) (statistics []lib.OperatorUsage, err error)

func (*MockRepo) InsertPipeline

func (r *MockRepo) InsertPipeline(_ lib.Pipeline) (err error)

func (*MockRepo) OperatorUsage added in v0.0.23

func (r *MockRepo) OperatorUsage(_ string, _ bool, _ map[string][]string) (statistics []lib.OperatorUsage, err error)

func (*MockRepo) PipelineUserCount added in v0.0.23

func (r *MockRepo) PipelineUserCount(_ string, _ bool, _ map[string][]string) (statistics []lib.PipelineUserCount, err error)

func (*MockRepo) UpdatePipeline

func (r *MockRepo) UpdatePipeline(_ lib.Pipeline, _ string) (err error)

type MongoRepo

type MongoRepo struct {
}

func NewMongoRepo

func NewMongoRepo() *MongoRepo

func (*MongoRepo) All

func (r *MongoRepo) All(userId string, admin bool, args map[string][]string, ids []string) (pipelines lib.PipelinesResponse, err error)

func (*MongoRepo) DeletePipeline

func (r *MongoRepo) DeletePipeline(id string, userId string, admin bool) (err error)

func (*MongoRepo) FindPipeline

func (r *MongoRepo) FindPipeline(id string, _ string) (pipeline lib.Pipeline, err error)

func (*MongoRepo) FlowUsage added in v0.0.33

func (r *MongoRepo) FlowUsage() (statistics []lib.FlowUsage, err error)

func (*MongoRepo) InsertPipeline

func (r *MongoRepo) InsertPipeline(pipeline lib.Pipeline) (err error)

func (*MongoRepo) OperatorUsage added in v0.0.22

func (r *MongoRepo) OperatorUsage(_ string, _ bool, _ map[string][]string) (statistics []lib.OperatorUsage, err error)

func (*MongoRepo) PipelineUserCount added in v0.0.22

func (r *MongoRepo) PipelineUserCount(_ string, _ bool, _ map[string][]string) (statistics []lib.PipelineUserCount, err error)

func (*MongoRepo) UpdatePipeline

func (r *MongoRepo) UpdatePipeline(pipeline lib.Pipeline, _ string) (err error)

type PipelineRepository

type PipelineRepository interface {
	InsertPipeline(pipeline lib.Pipeline) (err error)
	UpdatePipeline(pipeline lib.Pipeline, userId string) (err error)
	All(userId string, admin bool, args map[string][]string, ids []string) (pipelines lib.PipelinesResponse, err error)
	FindPipeline(id string, userId string) (pipeline lib.Pipeline, err error)
	DeletePipeline(id string, userId string, admin bool) (err error)
	PipelineUserCount(userId string, admin bool, args map[string][]string) (statistics []lib.PipelineUserCount, err error)
	OperatorUsage(userId string, admin bool, args map[string][]string) (statistics []lib.OperatorUsage, err error)
	FlowUsage() (statistics []lib.FlowUsage, err error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL