Documentation
¶
Index ¶
- Constants
- type BulkDeleteRequest
- type GroupPermissionsAuditDto
- type ListingRequest
- type MergingBaseKey
- type PolicyType
- type RbacPolicyEntityGroupDto
- type RbacRoleDto
- type RestrictedGroup
- type Role
- type RoleData
- type RoleFilter
- func (rf RoleFilter) GetAccessType() string
- func (rf RoleFilter) GetAction() string
- func (rf RoleFilter) GetCluster() string
- func (rf RoleFilter) GetEntity() string
- func (rf RoleFilter) GetEntityName() string
- func (rf RoleFilter) GetEnvironment() string
- func (rf RoleFilter) GetGroup() string
- func (rf RoleFilter) GetKind() string
- func (rf RoleFilter) GetNamespace() string
- func (rf RoleFilter) GetResource() string
- func (rf RoleFilter) GetTeam() string
- func (rf RoleFilter) GetWorkflow() string
- type RoleGroup
- type RoleGroupListingResponse
- type RoleType
- type SSOLoginDto
- type SelfRegisterDto
- type SortBy
- type SortOrder
- type TimeoutWindowConfigDto
- type UserGroupMapDto
- type UserInfo
- type UserListingResponse
- type UserMetadata
- type UserPermissionsAuditDto
- type UserRole
- type UserRoleGroup
Constants ¶
View Source
const ( POLICY_DIRECT PolicyType = 1 POLICY_GROUP PolicyType = 1 SUPERADMIN = "role:super-admin___" USER_TYPE_API_TOKEN = "apiToken" ACTION_SUPERADMIN = "super-admin" )
View Source
const ( SYSTEM_USER_ID = 1 PROJECT_TYPE = "team" ENV_TYPE = "environment" APP_TYPE = "app" WorkflowType = "workflow" CHART_GROUP_TYPE = "chart-group" MANAGER_TYPE RoleType = "manager" ADMIN_TYPE RoleType = "admin" TRIGGER_TYPE RoleType = "trigger" VIEW_TYPE RoleType = "view" ENTITY_ALL_TYPE RoleType = "entityAll" ENTITY_VIEW_TYPE RoleType = "entityView" ENTITY_SPECIFIC_TYPE RoleType = "entitySpecific" ENTITY_SPECIFIC_ADMIN_TYPE RoleType = "entitySpecificAdmin" ENTITY_SPECIFIC_VIEW_TYPE RoleType = "entitySpecificView" ROLE_SPECIFIC_TYPE RoleType = "roleSpecific" ENTITY_CLUSTER_ADMIN_TYPE RoleType = "clusterAdmin" ENTITY_CLUSTER_VIEW_TYPE RoleType = "clusterView" ADMIN_HELM_TYPE RoleType = "admin" EDIT_HELM_TYPE RoleType = "edit" VIEW_HELM_TYPE RoleType = "view" ENTITY_CLUSTER_EDIT_TYPE RoleType = "clusterEdit" SUPER_ADMIN = "super-admin" GLOBAL_ENTITY = "globalEntity" EMPTY_ROLEFILTER_ENTRY_PLACEHOLDER = "NONE" RoleNotFoundStatusPrefix = "role not fount for any given filter: " EmptyStringIndicatingAll = "" )
View Source
const ( ENTITY_APPS = "apps" EntityJobs = "jobs" CHART_GROUP_ENTITY = "chart-group" CLUSTER_ENTITIY = "cluster" )
View Source
const ( DEVTRON_APP = "devtron-app" APP_ACCESS_TYPE_HELM = "helm-app" EmptyAccessType = "" )
View Source
const ( NoTokenProvidedMessage = "no token provided" RoleAlreadyExistMessage = "role already exist" PolicyAlreadyExistMessage = "policy already exist" )
messages constants
View Source
const ( AdminUser string = "admin" SystemUser string = "system" )
View Source
const ( AdminUserId = 2 // we have established Admin user as 2 while setting up devtron SystemUserId = 1 // we have established System user as 1 while setting up devtron, which are being used for auto-trigger operations )
View Source
const ( API_TOKEN_USER_EMAIL_PREFIX = "API-TOKEN:" ApiTokenTableName = "api_token" )
View Source
const AnonymousUserEmail string = "anonymous"
View Source
const (
DefaultSize int = 20
)
View Source
const (
NOCHARTEXIST string = "NOCHARTEXIST"
)
View Source
const (
VALIDATION_FAILED_ERROR_MSG string = "validation failed: group name with , is not allowed"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BulkDeleteRequest ¶ added in v1.4.0
type BulkDeleteRequest struct {
Ids []int32 `json:"ids"`
ListingRequest *ListingRequest `json:"listingRequest,omitempty"`
LoggedInUserId int32 `json:"-"`
}
type GroupPermissionsAuditDto ¶ added in v1.4.0
type GroupPermissionsAuditDto struct {
RoleGroupInfo *RoleGroup `json:"roleGroupInfo,omitempty"`
EntityAudit sql.AuditLog `json:"entityAudit,omitempty"`
}
func NewGroupPermissionsAuditDto ¶ added in v1.4.0
func NewGroupPermissionsAuditDto() *GroupPermissionsAuditDto
func (*GroupPermissionsAuditDto) WithEntityAudit ¶ added in v1.4.0
func (pa *GroupPermissionsAuditDto) WithEntityAudit(entityAudit sql.AuditLog) *GroupPermissionsAuditDto
func (*GroupPermissionsAuditDto) WithRoleGroupInfo ¶ added in v1.4.0
func (pa *GroupPermissionsAuditDto) WithRoleGroupInfo(roleGroupInfo *RoleGroup) *GroupPermissionsAuditDto
type ListingRequest ¶ added in v1.4.0
type MergingBaseKey ¶ added in v1.1.0
type MergingBaseKey string
const ( ApplicationBasedKey MergingBaseKey = "application" EnvironmentBasedKey MergingBaseKey = "environment" )
type PolicyType ¶ added in v1.4.0
type PolicyType int
type RbacRoleDto ¶
type RbacRoleDto struct {
Id int `json:"id"` // id of the default role
RoleName string `json:"roleName"`
RoleDisplayName string `json:"roleDisplayName"`
RoleDescription string `json:"roleDescription"`
*RbacPolicyEntityGroupDto
}
type RestrictedGroup ¶ added in v1.4.0
type RoleData ¶ added in v1.4.0
type RoleData struct {
Id int `json:"id" validate:"number"`
Role string `json:"role" validate:"required"`
Entity string `json:"entity"`
Team string `json:"team"`
EntityName string `json:"entityName"`
Environment string `json:"environment"`
Action string `json:"action"`
AccessType string `json:"accessType"`
Cluster string `json:"cluster"`
Namespace string `json:"namespace"`
Group string `json:"group"`
Kind string `json:"kind"`
Resource string `json:"resource"`
}
type RoleFilter ¶ added in v1.4.0
type RoleFilter struct {
Entity string `json:"entity"`
Team string `json:"team"`
EntityName string `json:"entityName"`
Environment string `json:"environment"`
Action string `json:"action"`
AccessType string `json:"accessType"`
Cluster string `json:"cluster"`
Namespace string `json:"namespace"`
Group string `json:"group"`
Kind string `json:"kind"`
Resource string `json:"resource"`
Workflow string `json:"workflow"`
}
func (RoleFilter) GetAccessType ¶ added in v1.4.0
func (rf RoleFilter) GetAccessType() string
func (RoleFilter) GetAction ¶ added in v1.4.0
func (rf RoleFilter) GetAction() string
func (RoleFilter) GetCluster ¶ added in v1.4.0
func (rf RoleFilter) GetCluster() string
func (RoleFilter) GetEntity ¶ added in v1.4.0
func (rf RoleFilter) GetEntity() string
func (RoleFilter) GetEntityName ¶ added in v1.4.0
func (rf RoleFilter) GetEntityName() string
func (RoleFilter) GetEnvironment ¶ added in v1.4.0
func (rf RoleFilter) GetEnvironment() string
func (RoleFilter) GetGroup ¶ added in v1.4.0
func (rf RoleFilter) GetGroup() string
func (RoleFilter) GetKind ¶ added in v1.4.0
func (rf RoleFilter) GetKind() string
func (RoleFilter) GetNamespace ¶ added in v1.4.0
func (rf RoleFilter) GetNamespace() string
func (RoleFilter) GetResource ¶ added in v1.4.0
func (rf RoleFilter) GetResource() string
func (RoleFilter) GetTeam ¶ added in v1.4.0
func (rf RoleFilter) GetTeam() string
func (RoleFilter) GetWorkflow ¶ added in v1.4.0
func (rf RoleFilter) GetWorkflow() string
type RoleGroupListingResponse ¶ added in v1.4.0
type SSOLoginDto ¶ added in v1.4.0
type SelfRegisterDto ¶ added in v1.4.0
type SelfRegisterDto struct {
UserInfo *UserInfo
}
type TimeoutWindowConfigDto ¶ added in v1.4.0
type TimeoutWindowConfigDto struct {
}
type UserGroupMapDto ¶ added in v1.4.0
type UserGroupMapDto struct {
}
type UserInfo ¶ added in v1.4.0
type UserInfo struct {
Id int32 `json:"id" validate:"number,not-system-admin-userid"`
EmailId string `json:"email_id" validate:"required,not-system-admin-user"` // TODO : have to migrate json key to emailId and also handle backward compatibility
Roles []string `json:"roles,omitempty"`
AccessToken string `json:"access_token,omitempty"`
RoleFilters []RoleFilter `json:"roleFilters"`
Groups []string `json:"groups"` // this will be deprecated in future do not use
UserRoleGroup []UserRoleGroup `json:"userRoleGroups"` // role group with metadata
SuperAdmin bool `json:"superAdmin,notnull"`
LastLoginTime time.Time `json:"lastLoginTime"`
UserType string `json:"-"`
LastUsedAt time.Time `json:"-"`
LastUsedByIp string `json:"-"`
Exist bool `json:"-"`
UserId int32 `json:"-"` // created or modified user id
}
type UserListingResponse ¶ added in v1.4.0
type UserMetadata ¶ added in v1.5.1
type UserPermissionsAuditDto ¶ added in v1.4.0
type UserPermissionsAuditDto struct {
UserInfo *UserInfo `json:"userInfo,omitempty"`
EntityAudit sql.AuditLog `json:"entityAudit,omitempty"`
}
func NewUserPermissionsAuditDto ¶ added in v1.4.0
func NewUserPermissionsAuditDto() *UserPermissionsAuditDto
func (*UserPermissionsAuditDto) WithEntityAudit ¶ added in v1.4.0
func (pa *UserPermissionsAuditDto) WithEntityAudit(entityAudit sql.AuditLog) *UserPermissionsAuditDto
func (*UserPermissionsAuditDto) WithUserInfo ¶ added in v1.4.0
func (pa *UserPermissionsAuditDto) WithUserInfo(userInfo *UserInfo) *UserPermissionsAuditDto
type UserRoleGroup ¶ added in v1.4.0
type UserRoleGroup struct {
RoleGroup *RoleGroup `json:"roleGroup"`
}
Click to show internal directories.
Click to hide internal directories.