dao

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AppDao

type AppDao struct {
	*Dao
}

func NewApp

func NewApp(db *mongo.Database) *AppDao

func (*AppDao) Create

func (p *AppDao) Create(ctx context.Context, in *app.Application) (*app.Application, error)

func (*AppDao) Get

func (p *AppDao) Get(ctx context.Context, id string) (*app.Application, error)

func (*AppDao) GetByName

func (p *AppDao) GetByName(ctx context.Context, name string) (*app.Application, error)

func (*AppDao) List

func (p *AppDao) List(ctx context.Context, m bson.M) ([]*app.Application, int64, error)

func (*AppDao) Update

func (p *AppDao) Update(ctx context.Context, in *app.Application) (*app.Application, error)

type BuilderDao

type BuilderDao struct {
	*Dao
}

func NewBuilderDao

func NewBuilderDao(db *mongo.Database) *BuilderDao

func (*BuilderDao) Create

func (p *BuilderDao) Create(ctx context.Context, in *builder.Builder) (*builder.Builder, error)

func (*BuilderDao) Get

func (p *BuilderDao) Get(ctx context.Context, id string) (*builder.Builder, error)

func (*BuilderDao) GetByName

func (p *BuilderDao) GetByName(ctx context.Context, name string) (*builder.Builder, error)

func (*BuilderDao) List

func (p *BuilderDao) List(ctx context.Context, m bson.M) ([]*builder.Builder, int64, error)

func (*BuilderDao) Update

func (p *BuilderDao) Update(ctx context.Context, in *builder.Builder) (*builder.Builder, error)

type ClusterDao

type ClusterDao struct {
	*Dao
}

func NewClusterDao

func NewClusterDao(db *mongo.Database) *ClusterDao

func (*ClusterDao) Create

func (p *ClusterDao) Create(ctx context.Context, in *cluster.Cluster) (*cluster.Cluster, error)

func (*ClusterDao) Get

func (p *ClusterDao) Get(ctx context.Context, id string) (*cluster.Cluster, error)

func (*ClusterDao) List

func (p *ClusterDao) List(ctx context.Context, m bson.M) ([]*cluster.Cluster, int64, error)

func (*ClusterDao) Update

func (p *ClusterDao) Update(ctx context.Context, in *cluster.Cluster) (*cluster.Cluster, error)

type Dao

type Dao struct {
	// contains filtered or unexported fields
}

func NewDao

func NewDao(collection *mongo.Collection) *Dao

func (*Dao) Delete

func (p *Dao) Delete(ctx context.Context, id string) (err error)

type DeploymentDao

type DeploymentDao struct {
	*Dao
}

func NewDeploymentDao

func NewDeploymentDao(db *mongo.Database) *DeploymentDao

func (*DeploymentDao) Create

func (*DeploymentDao) Get

func (*DeploymentDao) GetByName

func (p *DeploymentDao) GetByName(ctx context.Context, name string) (*deployment.Deployment, error)

func (*DeploymentDao) List

func (*DeploymentDao) Update

type EgressDao

type EgressDao struct {
	*Dao
}

func NewEgressDao

func NewEgressDao(db *mongo.Database) *EgressDao

func (*EgressDao) Create

func (p *EgressDao) Create(ctx context.Context, in *egress.Egress) (*egress.Egress, error)

func (*EgressDao) Get

func (p *EgressDao) Get(ctx context.Context, id string) (*egress.Egress, error)

func (*EgressDao) List

func (p *EgressDao) List(ctx context.Context, m bson.M) ([]*egress.Egress, int64, error)

func (*EgressDao) Update

func (p *EgressDao) Update(ctx context.Context, in *egress.Egress) (*egress.Egress, error)

type EntryDao

type EntryDao struct {
	*Dao
}

func NewEntryDao

func NewEntryDao(db *mongo.Database) *EntryDao

func (*EntryDao) Create

func (p *EntryDao) Create(ctx context.Context, in *entry.Entry) (*entry.Entry, error)

func (*EntryDao) Get

func (p *EntryDao) Get(ctx context.Context, id string) (*entry.Entry, error)

func (*EntryDao) List

func (p *EntryDao) List(ctx context.Context, m bson.M) ([]*entry.Entry, int64, error)

func (*EntryDao) Update

func (p *EntryDao) Update(ctx context.Context, in *entry.Entry) (*entry.Entry, error)

type Gateway added in v0.0.3

type Gateway struct {
	*Dao
}

func NewGateway added in v0.0.3

func NewGateway(db *mongo.Database) *Gateway

func (*Gateway) Create added in v0.0.3

func (p *Gateway) Create(ctx context.Context, in *gateway.Gateway) (*gateway.Gateway, error)

func (*Gateway) Get added in v0.0.3

func (p *Gateway) Get(ctx context.Context, id string) (*gateway.Gateway, error)

func (*Gateway) List added in v0.0.3

func (p *Gateway) List(ctx context.Context, m bson.M) ([]*gateway.Gateway, int64, error)

func (*Gateway) Update added in v0.0.3

func (p *Gateway) Update(ctx context.Context, in *gateway.Gateway) (*gateway.Gateway, error)

type ImageRegistryDao

type ImageRegistryDao struct {
	*Dao
}

func NewRegistryDao

func NewRegistryDao(db *mongo.Database) *ImageRegistryDao

func (*ImageRegistryDao) Create

func (*ImageRegistryDao) Get

func (*ImageRegistryDao) GetByName

func (p *ImageRegistryDao) GetByName(ctx context.Context, name string) (*image.Registry, error)

func (*ImageRegistryDao) List

func (p *ImageRegistryDao) List(ctx context.Context, m bson.M) ([]*image.Registry, int64, error)

func (*ImageRegistryDao) Update

type MiddlewareClaim

type MiddlewareClaim struct {
	*Dao
}

func NewMiddlewareClaimDao

func NewMiddlewareClaimDao(db *mongo.Database) *MiddlewareClaim

func (*MiddlewareClaim) Create

func (*MiddlewareClaim) Get

func (*MiddlewareClaim) List

func (p *MiddlewareClaim) List(ctx context.Context, m bson.M) ([]*middleware.Claim, int64, error)

func (*MiddlewareClaim) Update

type MiddlewareInstance

type MiddlewareInstance struct {
	*Dao
}

func NewMiddlewareInstanceDao

func NewMiddlewareInstanceDao(db *mongo.Database) *MiddlewareInstance

func (*MiddlewareInstance) Create

func (*MiddlewareInstance) FindByAppid

func (p *MiddlewareInstance) FindByAppid(ctx context.Context, mType string, appid string) (*middleware.Instance, error)

func (*MiddlewareInstance) Get

func (*MiddlewareInstance) GetDefault

func (p *MiddlewareInstance) GetDefault(ctx context.Context, mType string, env string) (*middleware.Instance, error)

func (*MiddlewareInstance) List

func (*MiddlewareInstance) Update

type ProjectDao

type ProjectDao struct {
	*Dao
}

func NewProject

func NewProject(db *mongo.Database) *ProjectDao

func (*ProjectDao) Create

func (p *ProjectDao) Create(ctx context.Context, in *project.Project) (*project.Project, error)

func (*ProjectDao) Get

func (p *ProjectDao) Get(ctx context.Context, id string) (*project.Project, error)

func (*ProjectDao) List

func (p *ProjectDao) List(ctx context.Context, m bson.M) ([]*project.Project, int64, error)

func (*ProjectDao) Update

func (p *ProjectDao) Update(ctx context.Context, in *project.Project) (*project.Project, error)

type ProjectImageDao

type ProjectImageDao struct {
	*Dao
}

func NewProjectImageDao

func NewProjectImageDao(db *mongo.Database) *ProjectImageDao

func (*ProjectImageDao) Create

func (p *ProjectImageDao) Create(ctx context.Context, in *image.Image) (*image.Image, error)

func (*ProjectImageDao) Get

func (p *ProjectImageDao) Get(ctx context.Context, id string) (*image.Image, error)

func (*ProjectImageDao) GetByName

func (p *ProjectImageDao) GetByName(ctx context.Context, name string) (*image.Image, error)

func (*ProjectImageDao) List

func (p *ProjectImageDao) List(ctx context.Context, m bson.M) ([]*image.Image, int64, error)

func (*ProjectImageDao) Update

func (p *ProjectImageDao) Update(ctx context.Context, in *image.Image) (*image.Image, error)

type ProviderDao

type ProviderDao struct {
	*Dao
}

func NewProviderDao

func NewProviderDao(db *mongo.Database) *ProviderDao

func (*ProviderDao) Create

func (*ProviderDao) Get

func (p *ProviderDao) Get(ctx context.Context, id string) (*provider.Provider, error)

func (*ProviderDao) GetByName

func (p *ProviderDao) GetByName(ctx context.Context, name string) (*provider.Provider, error)

func (*ProviderDao) List

func (p *ProviderDao) List(ctx context.Context, m bson.M) ([]*provider.Provider, int64, error)

func (*ProviderDao) Update

type RouteDao

type RouteDao struct {
	*Dao
}

func NewRouteDao

func NewRouteDao(db *mongo.Database) *RouteDao

func (*RouteDao) Create

func (p *RouteDao) Create(ctx context.Context, in *route.Route) (*route.Route, error)

func (*RouteDao) Get

func (p *RouteDao) Get(ctx context.Context, id string) (*route.Route, error)

func (*RouteDao) List

func (p *RouteDao) List(ctx context.Context, m bson.M) ([]*route.Route, int64, error)

func (*RouteDao) Update

func (p *RouteDao) Update(ctx context.Context, in *route.Route) (*route.Route, error)

type UserDao

type UserDao struct {
	*Dao
}

func NewUserDao

func NewUserDao(db *mongo.Database) *UserDao

func (*UserDao) Create

func (p *UserDao) Create(ctx context.Context, in *user.User) (*user.User, error)

func (*UserDao) Get

func (p *UserDao) Get(ctx context.Context, id string) (*user.User, error)

func (*UserDao) GetByOuterId

func (p *UserDao) GetByOuterId(ctx context.Context, subject string) (*user.User, error)

func (*UserDao) List

func (p *UserDao) List(ctx context.Context, m bson.M) ([]*user.User, int64, error)

func (*UserDao) Update

func (p *UserDao) Update(ctx context.Context, in *user.User) (*user.User, error)

Jump to

Keyboard shortcuts

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