Documentation ¶
Index ¶
- Constants
- func Create(ctx context.Context, db bun.IDB, entity interface{}) (interface{}, error)
- func CreateBootstrapAgent(ctx context.Context, db bun.IDB, ba *models.BootstrapAgent) error
- func CreateKubeconfigRevocation(ctx context.Context, db bun.IDB, kr *models.KubeconfigRevocation) error
- func CreateKubeconfigSetting(ctx context.Context, db bun.IDB, ks *models.KubeconfigSetting) error
- func CreateOrUpdateBootstrapAgentTemplate(ctx context.Context, db bun.IDB, template *models.BootstrapAgentTemplate) error
- func CreateOrUpdateBootstrapInfra(ctx context.Context, db bun.IDB, infra *models.BootstrapInfra) error
- func CreatekubectlClusterSettings(ctx context.Context, db bun.IDB, kc *models.KubectlClusterSetting) error
- func Delete(ctx context.Context, db bun.IDB, id uuid.UUID, entity interface{}) error
- func DeleteBootstrapAgent(ctx context.Context, db bun.IDB, templateRef string, ...) error
- func DeleteBootstrapAgentTempate(ctx context.Context, db bun.IDB, opts *commonv3.QueryOptions, infraRef string) error
- func DeleteR(ctx context.Context, db bun.IDB, id uuid.UUID, entity interface{}) error
- func DeleteX(ctx context.Context, db bun.IDB, field string, value interface{}, ...) error
- func DeleteXR(ctx context.Context, db bun.IDB, field string, value interface{}, ...) error
- func GetAcccountsWithApprovalPermission(ctx context.Context, db bun.IDB, orgID, partnerID uuid.UUID) ([]string, error)
- func GetAccountBasics(ctx context.Context, db bun.IDB, accountID uuid.UUID) (*models.Account, error)
- func GetAccountGroups(ctx context.Context, db bun.IDB, accountID uuid.UUID) ([]models.GroupAccount, error)
- func GetAccountPermissions(ctx context.Context, db bun.IDB, accountID, orgID, partnerID uuid.UUID) ([]models.AccountPermission, error)
- func GetAccountPermissionsByProjectIDPermissions(ctx context.Context, db bun.IDB, accountID, orgID, partnerID uuid.UUID, ...) ([]models.AccountPermission, error)
- func GetAccountProjectByPermission(ctx context.Context, db bun.IDB, ...) (models.AccountPermission, error)
- func GetAccountProjectNamespaces(ctx context.Context, db bun.IDB, projectID uuid.UUID, accountID uuid.UUID) ([]string, error)
- func GetAccountProjectsByPermission(ctx context.Context, db bun.IDB, accountID, orgID, partnerID uuid.UUID, ...) ([]models.AccountPermission, error)
- func GetAttributesByName(ctx context.Context, db bun.IDB, name string, entity interface{}, ...) (interface{}, error)
- func GetAuditLogAggregations(ctx context.Context, db *bun.DB, tag, field string, filters query.QueryFilters) ([]models.AggregatorData, error)
- func GetAuditLogs(ctx context.Context, db *bun.DB, tag string, filters query.QueryFilters) ([]models.AuditLog, error)
- func GetBootstrapAgent(ctx context.Context, db bun.IDB, templateRef string, ...) (*models.BootstrapAgent, error)
- func GetBootstrapAgentCountForClusterID(ctx context.Context, db bun.IDB, clusterID string, orgID uuid.UUID) (int, error)
- func GetBootstrapAgentForClusterID(ctx context.Context, db bun.IDB, clusterID string, orgID uuid.UUID) (*models.BootstrapAgent, error)
- func GetBootstrapAgentForToken(ctx context.Context, db bun.IDB, token string) (*models.BootstrapAgent, error)
- func GetBootstrapAgentTemplateForHost(ctx context.Context, db bun.IDB, host string) (*models.BootstrapAgentTemplate, error)
- func GetBootstrapAgentTemplateForToken(ctx context.Context, db bun.IDB, token string) (*models.BootstrapAgentTemplate, error)
- func GetBootstrapAgents(ctx context.Context, db bun.IDB, opts *commonv3.QueryOptions, ...) (ret []models.BootstrapAgent, count int, err error)
- func GetByID(ctx context.Context, db bun.IDB, id uuid.UUID, entity interface{}) (interface{}, error)
- func GetByName(ctx context.Context, db bun.IDB, name string, entity interface{}) (interface{}, error)
- func GetByNamePartnerOrg(ctx context.Context, db bun.IDB, name string, pid uuid.NullUUID, ...) (interface{}, error)
- func GetDefaultAccountProject(ctx context.Context, db bun.IDB, accountID uuid.UUID) (models.AccountPermission, error)
- func GetDefaultUserGroup(ctx context.Context, db bun.IDB, orgID uuid.UUID) (*models.Group, error)
- func GetDefaultUserGroupAccount(ctx context.Context, db bun.IDB, accountID, groupID uuid.UUID) (*models.GroupAccount, error)
- func GetFileteredProjects(ctx context.Context, db bun.IDB, account, partner, org uuid.UUID) ([]models.Project, error)
- func GetGroupPermissions(ctx context.Context, db bun.IDB, groupNames []string, ...) ([]models.GroupPermission, error)
- func GetGroupPermissionsByProjectIDPermissions(ctx context.Context, db bun.IDB, groupNames []string, ...) ([]models.GroupPermission, error)
- func GetGroupProjectNamespaces(ctx context.Context, db bun.IDB, projectID uuid.UUID, accountID uuid.UUID) ([]string, error)
- func GetGroupProjectsByPermission(ctx context.Context, db bun.IDB, groupNames []string, ...) ([]models.GroupPermission, error)
- func GetGroupRoles(ctx context.Context, db bun.IDB, id uuid.UUID) ([]*userv3.ProjectNamespaceRole, error)
- func GetGroups(ctx context.Context, db bun.IDB, id uuid.UUID) ([]models.Group, error)
- func GetIdByName(ctx context.Context, db bun.IDB, name string, entity interface{}) (interface{}, error)
- func GetIdByNamePartnerOrg(ctx context.Context, db bun.IDB, name string, pid uuid.NullUUID, ...) (interface{}, error)
- func GetKubeconfigRevocation(ctx context.Context, db bun.IDB, orgID, accountID uuid.UUID, isSSOUser bool) (*models.KubeconfigRevocation, error)
- func GetKubeconfigSetting(ctx context.Context, db bun.IDB, orgID, accountID uuid.UUID, issSSO bool) (*models.KubeconfigSetting, error)
- func GetM(ctx context.Context, db bun.IDB, checks map[string]interface{}, ...) (interface{}, error)
- func GetNameById(ctx context.Context, db bun.IDB, id uuid.UUID, entity interface{}) (interface{}, error)
- func GetNamesByIds(ctx context.Context, db bun.IDB, id []uuid.UUID, entity interface{}) ([]string, error)
- func GetOrganizationId(ctx context.Context, db bun.IDB, name string) (uuid.UUID, error)
- func GetOrganizationName(ctx context.Context, db bun.IDB, id uuid.UUID) (string, error)
- func GetPartnerId(ctx context.Context, db bun.IDB, name string) (uuid.UUID, error)
- func GetPartnerName(ctx context.Context, db bun.IDB, id uuid.UUID) (string, error)
- func GetProjectByGroup(ctx context.Context, db bun.IDB, groupNames []string, ...) ([]models.GroupPermission, error)
- func GetProjectGroupRoles(ctx context.Context, db bun.IDB, id uuid.UUID) ([]*userv3.ProjectNamespaceRole, error)
- func GetProjectId(ctx context.Context, db bun.IDB, name string) (uuid.UUID, error)
- func GetProjectName(ctx context.Context, db bun.IDB, id uuid.UUID) (string, error)
- func GetProjectNamespaces(ctx context.Context, db bun.IDB, projectID uuid.UUID) ([]string, error)
- func GetProjectUserRoles(ctx context.Context, db bun.IDB, id uuid.UUID) ([]*userv3.UserRole, error)
- func GetQueryFilteredUsers(ctx context.Context, db bun.IDB, partner, org, group, role uuid.UUID, ...) ([]uuid.UUID, error)
- func GetRolePermissions(ctx context.Context, db bun.IDB, id uuid.UUID) ([]models.ResourcePermission, error)
- func GetRolePermissionsByNames(ctx context.Context, db bun.IDB, permissions ...string) ([]models.ResourcePermission, error)
- func GetRolePermissionsByScope(ctx context.Context, db bun.IDB, scope string) ([]models.ResourcePermission, error)
- func GetSSOAcccountsWithApprovalPermission(ctx context.Context, db bun.IDB, orgID, partnerID uuid.UUID) ([]string, error)
- func GetSSOUsersGroupProjectRole(ctx context.Context, db bun.IDB, orgID uuid.UUID) ([]models.SSOAccountGroupProjectRole, error)
- func GetUserByEmail(ctx context.Context, db bun.IDB, name string, entity interface{}) (interface{}, error)
- func GetUserFullByEmail(ctx context.Context, db bun.IDB, name string, entity interface{}) (interface{}, error)
- func GetUserIdByEmail(ctx context.Context, db bun.IDB, name string, entity interface{}) (interface{}, error)
- func GetUserLastAuthTime(ctx context.Context, db bun.IDB, userId uuid.UUID) (time.Time, error)
- func GetUserNamesByIds(ctx context.Context, db bun.IDB, id []uuid.UUID, entity interface{}) ([]string, error)
- func GetUserRoles(ctx context.Context, db bun.IDB, id uuid.UUID) ([]*userv3.ProjectNamespaceRole, error)
- func GetUserType(ctx context.Context, db bun.IDB, id uuid.UUID) (string, error)
- func GetUsers(ctx context.Context, db bun.IDB, id uuid.UUID) ([]models.KratosIdentities, error)
- func GetX(ctx context.Context, db bun.IDB, field string, value interface{}, ...) (interface{}, error)
- func GetkubectlClusterSettings(ctx context.Context, db bun.IDB, orgID uuid.UUID, name string) (*models.KubectlClusterSetting, error)
- func HardDeleteAll(ctx context.Context, db bun.IDB, entity interface{}) error
- func IsOrgAdmin(ctx context.Context, db bun.IDB, accountID, partnerID uuid.UUID) (isOrgAdmin bool, err error)
- func IsOrgReadOnly(ctx context.Context, db bun.IDB, accountID, organizationID uuid.UUID, ...) (isOrgReadOnly bool, err error)
- func IsPartnerSuperAdmin(ctx context.Context, db bun.IDB, accountID, partnerID uuid.UUID) (isPartnerAdmin, isSuperAdmin bool, err error)
- func IsSSOAccount(ctx context.Context, db bun.IDB, id uuid.UUID) (bool, error)
- func List(ctx context.Context, db bun.IDB, partnerId uuid.NullUUID, ...) (interface{}, error)
- func ListAll(ctx context.Context, db bun.IDB, entities interface{}) (interface{}, error)
- func ListByProject(ctx context.Context, db bun.IDB, partnerId uuid.NullUUID, ...) error
- func ListFiltered(ctx context.Context, db bun.IDB, partnerId uuid.NullUUID, ...) (interface{}, error)
- func ListFilteredUsers(ctx context.Context, db bun.IDB, fusers []uuid.UUID, query string, ...) ([]models.KratosIdentities, error)
- func ListFilteredUsersWithGroup(ctx context.Context, db bun.IDB, fusers []uuid.UUID, group uuid.UUID, ...) ([]models.KratosIdentities, error)
- func RegisterBootstrapAgent(ctx context.Context, db bun.Tx, token, ip, fingerprint string) error
- func SelectBootstrapAgentTemplates(ctx context.Context, db bun.IDB, opts *commonv3.QueryOptions) (ret []models.BootstrapAgentTemplate, count int, err error)
- func SelectBootstrapAgents(ctx context.Context, db bun.IDB, templateRef string, ...) (ret []models.BootstrapAgent, count int, err error)
- func Update(ctx context.Context, db bun.IDB, id uuid.UUID, entity interface{}) (interface{}, error)
- func UpdateBootstrapAgent(ctx context.Context, db bun.IDB, ba *models.BootstrapAgent, ...) error
- func UpdateBootstrapAgentDeleteAt(ctx context.Context, db bun.IDB, templateRef string) error
- func UpdateBootstrapAgentTempateDeleteAt(ctx context.Context, db bun.IDB, opts *commonv3.QueryOptions) error
- func UpdateBootstrapInfraDeleteAt(ctx context.Context, db bun.IDB, opts *commonv3.QueryOptions) error
- func UpdateKubeconfigRevocation(ctx context.Context, db bun.IDB, kr *models.KubeconfigRevocation) error
- func UpdateKubeconfigSetting(ctx context.Context, db bun.IDB, ks *models.KubeconfigSetting) error
- func UpdateX(ctx context.Context, db bun.IDB, field string, value interface{}, ...) (interface{}, error)
- func UpdatekubectlClusterSettings(ctx context.Context, db bun.IDB, kc *models.KubectlClusterSetting) error
- type ProjectOrg
Constants ¶
View Source
const ( KratosPasswordType = "password" KratosOidcType = "oidc" )
Variables ¶
This section is empty.
Functions ¶
func CreateBootstrapAgent ¶
func CreateKubeconfigSetting ¶
func DeleteBootstrapAgent ¶
func DeleteXR ¶
func DeleteXR(ctx context.Context, db bun.IDB, field string, value interface{}, entity interface{}) error
DeleteXR delete with selector and returns the changed items
func GetAccountBasics ¶
func GetAccountGroups ¶
func GetAccountPermissions ¶
func GetAccountProjectByPermission ¶ added in v0.2.8
func GetAttributesByName ¶ added in v0.1.9
func GetAuditLogAggregations ¶ added in v0.1.8
func GetAuditLogAggregations(ctx context.Context, db *bun.DB, tag, field string, filters query.QueryFilters) ([]models.AggregatorData, error)
func GetAuditLogs ¶ added in v0.1.8
func GetBootstrapAgent ¶
func GetBootstrapAgent(ctx context.Context, db bun.IDB, templateRef string, opts *commonv3.QueryOptions) (*models.BootstrapAgent, error)
func GetBootstrapAgents ¶
func GetByNamePartnerOrg ¶
func GetDefaultUserGroup ¶
func GetFileteredProjects ¶
func GetGroupPermissions ¶
func GetGroupRoles ¶
func GetIdByName ¶
func GetIdByNamePartnerOrg ¶
func GetKubeconfigRevocation ¶
func GetKubeconfigSetting ¶
func GetM ¶
func GetM(ctx context.Context, db bun.IDB, checks map[string]interface{}, entity interface{}) (interface{}, error)
M for multi ;)
func GetNameById ¶
func GetNamesByIds ¶
func GetOrganizationId ¶
func GetOrganizationName ¶
func GetPartnerId ¶
func GetPartnerName ¶
func GetProjectByGroup ¶
func GetProjectGroupRoles ¶
func GetProjectId ¶
func GetProjectName ¶
func GetProjectNamespaces ¶
func GetProjectUserRoles ¶
func GetQueryFilteredUsers ¶
func GetRolePermissions ¶
func GetRolePermissionsByNames ¶ added in v0.1.6
func GetUserByEmail ¶
func GetUserFullByEmail ¶
func GetUserIdByEmail ¶
func GetUserLastAuthTime ¶ added in v0.1.7
func GetUserNamesByIds ¶
func GetUserRoles ¶
func HardDeleteAll ¶
HardDeleteAll deletes all records in a table (primarily for use in scripts)
func IsOrgAdmin ¶
func IsOrgReadOnly ¶ added in v0.2.5
func IsPartnerSuperAdmin ¶
func ListByProject ¶
func ListFiltered ¶
func ListFiltered(ctx context.Context, db bun.IDB, partnerId uuid.NullUUID, organizationId uuid.NullUUID, projectId uuid.NullUUID, entities interface{}, query string, orderBy string, order string, limit int, offset int) (interface{}, error)
TODO: Should we simplify this (less args)?
func ListFilteredUsers ¶
func ListFilteredUsers( ctx context.Context, db bun.IDB, fusers []uuid.UUID, query string, utype string, orderBy string, order string, limit int, offset int, ) ([]models.KratosIdentities, error)
ListFilteredUsers will return the list of users fileterd by query
func ListFilteredUsersWithGroup ¶
func ListFilteredUsersWithGroup( ctx context.Context, db bun.IDB, fusers []uuid.UUID, group uuid.UUID, query string, utype string, orderBy string, order string, limit int, offset int, ) ([]models.KratosIdentities, error)
ListFilteredUsersWithGroup is ListFilteredUsers but with Group fileter as well
func RegisterBootstrapAgent ¶
func SelectBootstrapAgentTemplates ¶
func SelectBootstrapAgentTemplates(ctx context.Context, db bun.IDB, opts *commonv3.QueryOptions) (ret []models.BootstrapAgentTemplate, count int, err error)
func SelectBootstrapAgents ¶
func UpdateBootstrapAgent ¶
func UpdateBootstrapAgent(ctx context.Context, db bun.IDB, ba *models.BootstrapAgent, opts *commonv3.QueryOptions) error
func UpdateBootstrapAgentDeleteAt ¶
updateBootstrapAgentDeleteAt builds query for deleting resource
func UpdateBootstrapInfraDeleteAt ¶
func UpdateBootstrapInfraDeleteAt(ctx context.Context, db bun.IDB, opts *commonv3.QueryOptions) error
updateBootstrapInfraDeleteAt builds query for deleting resource
func UpdateKubeconfigSetting ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.