projectCache

package
v1.3.0-rc.0...-0a48220 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(dbClient *dao.DBClient)

New make new caches about projcts

Types

type ProjectClusterNamespaces

type ProjectClusterNamespaces struct {
	ProjectID  uint64
	Namespaces map[string][]string
}

ProjectClusterNamespaces caches the relationship for project:cluster:namespace

func GetNamespacesByProjectID

func GetNamespacesByProjectID(id uint64) (*ProjectClusterNamespaces, bool)

GetNamespacesByProjectID receive a project id and returns its cluster and namespaces from caches

type ProjectMember

type ProjectMember struct {
	ProjectID uint64
	UserID    uint
	Name      string
	Nick      string
}

ProjectMember caches the relationship for project:owner

func GetMemberByProjectID

func GetMemberByProjectID(id uint64) (*ProjectMember, bool)

GetMemberByProjectID receive a project id and returns its owner from caches

Jump to

Keyboard shortcuts

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