Version: v0.0.0-...-29910c1 Latest Latest

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

Go to latest
Published: Aug 23, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Accessor

type Accessor struct {
	// contains filtered or unexported fields

Accessor is an accessor to postgreSQL to query data.

func New

func New(db *gorm.DB) *Accessor

New returns new accessor's ptr.

func (*Accessor) Create

func (x *Accessor) Create(clusterID uuid.UUID, appGroup *pb.AppGroup) (uuid.UUID, error)

Create creates a new application group in database.

func (*Accessor) DeleteAppGroup

func (x *Accessor) DeleteAppGroup(appGroupID uuid.UUID) error

DeleteAppGroup deletes an application group and applications.

func (*Accessor) GetAppGroup

func (x *Accessor) GetAppGroup(appGroupID uuid.UUID) (*pb.AppGroup, error)

GetAppGroup returns an application group by cluster_id and app_group_id.

func (*Accessor) GetAppGroups

func (x *Accessor) GetAppGroups(name string, appGroupType pb.AppGroupType) ([]*pb.AppGroup, error)

GetAppGroups returns application groups matching name and type in database.

func (*Accessor) GetAppGroupsByClusterID

func (x *Accessor) GetAppGroupsByClusterID(clusterID uuid.UUID, offset, limit int) ([]*pb.AppGroup, error)

GetApplicatiionGroup returns an application group in database.

func (*Accessor) GetApps

func (x *Accessor) GetApps(appGroupID uuid.UUID, appType pb.AppType) ([]*pb.Application, error)

GetApps queies applications by app type.

func (*Accessor) GetAppsByAppGroupID

func (x *Accessor) GetAppsByAppGroupID(appGroupID uuid.UUID) ([]*pb.Application, error)

GetAppsByAppGroupID queies applications by app group id.

func (*Accessor) UpdateApp

func (x *Accessor) UpdateApp(appGroupID uuid.UUID, appType pb.AppType, endpoint, metadata string) error

UpdateApp updates data of application in database.

func (*Accessor) UpdateAppGroupStatus

func (x *Accessor) UpdateAppGroupStatus(appGroupID uuid.UUID, status pb.AppGroupStatus) error

UpdateAppGroupStatus updates status of application group.

Source Files


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL