Documentation ¶
Index ¶
- type ProductArgs
- type ProductColl
- func (c *ProductColl) AddProductionService(productName, serviceName string) error
- func (c *ProductColl) AddService(productName, serviceName string) error
- func (c *ProductColl) Count() (int64, error)
- func (c *ProductColl) Create(args *template.Product) error
- func (c *ProductColl) Delete(productName string) error
- func (c *ProductColl) EnsureIndex(ctx context.Context) error
- func (c *ProductColl) Find(productName string) (*template.Product, error)
- func (c *ProductColl) FindProjectName(project string) (*template.Product, error)
- func (c *ProductColl) GetCollectionName() string
- func (c *ProductColl) List() ([]*template.Product, error)
- func (c *ProductColl) ListAllName() ([]string, error)
- func (c *ProductColl) ListNames(inNames []string) ([]string, error)
- func (c *ProductColl) ListNonPMProject() ([]*ProjectInfo, error)
- func (c *ProductColl) ListProjectBriefs(inNames []string) ([]*ProjectInfo, error)
- func (c *ProductColl) ListWithOption(opt *ProductListOpt) ([]*template.Product, error)
- func (c *ProductColl) PageListProjectByFilter(opt ProductListByFilterOpt) ([]*ProjectInfo, int, error)
- func (c *ProductColl) Update(productName string, args *template.Product) error
- func (c *ProductColl) UpdateAll(projects []*template.Product) error
- func (c *ProductColl) UpdateGlobalVars(productName string, serviceVars []*types.ServiceVariableKV) error
- func (c *ProductColl) UpdateOnboardingStatus(productName string, status int) error
- func (c *ProductColl) UpdateProductFeatureAndServices(productName string, productFeature *template.ProductFeature, ...) error
- func (c *ProductColl) UpdateProductionServiceOrchestration(productName string, services [][]string, updateBy string) error
- func (c *ProductColl) UpdateServiceOrchestration(productName string, services [][]string, updateBy string) error
- type ProductListByFilterOpt
- type ProductListOpt
- type ProjectInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProductArgs ¶
type ProductColl ¶
type ProductColl struct { *mongo.Collection mongo.Session // contains filtered or unexported fields }
func NewProductColl ¶
func NewProductColl() *ProductColl
func NewProductCollWithSess ¶
func NewProductCollWithSess(session mongo.Session) *ProductColl
func (*ProductColl) AddProductionService ¶
func (c *ProductColl) AddProductionService(productName, serviceName string) error
AddProductionService adds a service to services[0] if it is not there.
func (*ProductColl) AddService ¶
func (c *ProductColl) AddService(productName, serviceName string) error
AddService adds a service to services[0] if it is not there.
func (*ProductColl) Count ¶
func (c *ProductColl) Count() (int64, error)
func (*ProductColl) Delete ¶
func (c *ProductColl) Delete(productName string) error
func (*ProductColl) EnsureIndex ¶
func (c *ProductColl) EnsureIndex(ctx context.Context) error
func (*ProductColl) Find ¶
func (c *ProductColl) Find(productName string) (*template.Product, error)
func (*ProductColl) FindProjectName ¶
func (c *ProductColl) FindProjectName(project string) (*template.Product, error)
func (*ProductColl) GetCollectionName ¶
func (c *ProductColl) GetCollectionName() string
func (*ProductColl) ListAllName ¶
func (c *ProductColl) ListAllName() ([]string, error)
func (*ProductColl) ListNonPMProject ¶
func (c *ProductColl) ListNonPMProject() ([]*ProjectInfo, error)
func (*ProductColl) ListProjectBriefs ¶
func (c *ProductColl) ListProjectBriefs(inNames []string) ([]*ProjectInfo, error)
func (*ProductColl) ListWithOption ¶
func (c *ProductColl) ListWithOption(opt *ProductListOpt) ([]*template.Product, error)
ListWithOption ...
func (*ProductColl) PageListProjectByFilter ¶
func (c *ProductColl) PageListProjectByFilter(opt ProductListByFilterOpt) ([]*ProjectInfo, int, error)
func (*ProductColl) Update ¶
func (c *ProductColl) Update(productName string, args *template.Product) error
Update existing ProductTmpl
func (*ProductColl) UpdateAll ¶
func (c *ProductColl) UpdateAll(projects []*template.Product) error
UpdateAll updates all projects in a bulk write. Currently, only field `shared_services` is supported. Note: A bulk operation can have at most 1000 operations, but the client will do it for us. see https://stackoverflow.com/questions/24237887/what-is-mongodb-batch-operation-max-size Depreated This function is only used in migration of old versions, please use Update instead.
func (*ProductColl) UpdateGlobalVars ¶
func (c *ProductColl) UpdateGlobalVars(productName string, serviceVars []*types.ServiceVariableKV) error
func (*ProductColl) UpdateOnboardingStatus ¶
func (c *ProductColl) UpdateOnboardingStatus(productName string, status int) error
func (*ProductColl) UpdateProductFeatureAndServices ¶
func (c *ProductColl) UpdateProductFeatureAndServices(productName string, productFeature *template.ProductFeature, services, productionSvcs [][]string, updateBy string) error
func (*ProductColl) UpdateProductionServiceOrchestration ¶
func (c *ProductColl) UpdateProductionServiceOrchestration(productName string, services [][]string, updateBy string) error
func (*ProductColl) UpdateServiceOrchestration ¶
func (c *ProductColl) UpdateServiceOrchestration(productName string, services [][]string, updateBy string) error
type ProductListByFilterOpt ¶
type ProductListOpt ¶
type ProjectInfo ¶
type ProjectInfo struct { Name string `bson:"product_name"` Alias string `bson:"project_name"` Desc string `bson:"description"` UpdatedAt int64 `bson:"update_time"` UpdatedBy string `bson:"update_by"` OnboardStatus int `bson:"onboarding_status"` Public bool `bson:"public"` ProductFeature *templatemodels.ProductFeature `bson:"product_feature"` }
Click to show internal directories.
Click to hide internal directories.