dao

package
v0.3.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvironmentConnectorsEdgeSave

func EnvironmentConnectorsEdgeSave(ctx context.Context, mc model.ClientSet, entity *model.Environment) error

EnvironmentConnectorsEdgeSave saves the edge connectors of model.Environment entity.

func GetEnvironmentByID

func GetEnvironmentByID(ctx context.Context, mc model.ClientSet, id object.ID) (*model.Environment, error)

GetEnvironmentByID gets an environment including project & connectors edges by ID.

func GetEnvironmentsByIDs

func GetEnvironmentsByIDs(ctx context.Context, mc model.ClientSet, ids ...object.ID) ([]*model.Environment, error)

GetEnvironmentsByIDs gets environments including project & connectors edges by IDs.

func GetLatestRevisions

func GetLatestRevisions(
	ctx context.Context,
	modelClient model.ClientSet,
	serviceIDs ...object.ID,
) ([]*model.ServiceRevision, error)

func GetServiceDependantIDs

func GetServiceDependantIDs(ctx context.Context, mc model.ClientSet, serviceIDs ...object.ID) ([]object.ID, error)

GetServiceDependantIDs gets IDs of services that depend on the given services.

func GetServiceDependantNames

func GetServiceDependantNames(
	ctx context.Context,
	modelClient model.ClientSet,
	entity *model.Service,
) ([]string, error)

GetServiceDependantNames gets names of services that depends on the given service.

func GetServiceNamesByIDs

func GetServiceNamesByIDs(ctx context.Context, modelClient model.ClientSet, serviceIDs ...object.ID) ([]string, error)

func ProjectSubjectRolesEdgeSave

func ProjectSubjectRolesEdgeSave(ctx context.Context, mc model.ClientSet, entity *model.Project) error

ProjectSubjectRolesEdgeSave saves the edge subject roles of model.Project entity.

func ServiceDependenciesEdgeSave

func ServiceDependenciesEdgeSave(ctx context.Context, mc model.ClientSet, entity *model.Service) error

ServiceDependenciesEdgeSave saves the edge dependencies of model.Service entity.

func ServiceRelationshipCheckCycle

func ServiceRelationshipCheckCycle(s *model.ServiceRelationship) bool

ServiceRelationshipCheckCycle checks if the path contains a dependency cycle.

func ServiceRelationshipGetDependencyNames

func ServiceRelationshipGetDependencyNames(entity *model.Service) []string

ServiceRelationshipGetDependencyNames gets dependency service names of the given service.

func ServiceResourceGetUniqueKey

func ServiceResourceGetUniqueKey(r *model.ServiceResource) string

ServiceResourceGetUniqueKey returns the unique index key of the given model.ServiceResource.

func ServiceResourceInstancesEdgeSave

func ServiceResourceInstancesEdgeSave(ctx context.Context, mc model.ClientSet, entity *model.ServiceResource) error

ServiceResourceInstancesEdgeSave saves the edge instances of model.ServiceResource entity.

func ServiceResourceRelationshipUpdateWithDependencies

func ServiceResourceRelationshipUpdateWithDependencies(
	ctx context.Context,
	mc model.ClientSet,
	dependencies map[string][]string,
	recordResources,
	createResources model.ServiceResources,
) error

ServiceResourceRelationshipUpdateWithDependencies updates the relationship with dependencies and resources.

func ServiceResourceShapeClassQuery

func ServiceResourceShapeClassQuery(query *model.ServiceResourceQuery) *model.ServiceResourceQuery

ServiceResourceShapeClassQuery wraps the given model.ServiceResource query to select all shape class resources and the owned components and dependencies of them.

func ServiceResourceToMap

func ServiceResourceToMap(resources []*model.ServiceResource) map[string]*model.ServiceResource

ServiceResourceToMap recursive set a map of service resources indexed by its unique index.

func SubjectRolesEdgeSave

func SubjectRolesEdgeSave(ctx context.Context, mc model.ClientSet, entity *model.Subject) error

SubjectRolesEdgeSave saves the edge roles of model.Subject entity.

Types

This section is empty.

Jump to

Keyboard shortcuts

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