models

package
v0.2.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	bun.BaseModel `bun:"table:identities,alias:identities"`

	ID        uuid.UUID              `bun:"id,type:uuid"`
	Traits    map[string]interface{} `bun:"traits,type:jsonb"`
	State     string                 `bun:"state,notnull"`
	Username  string                 `bun:"username"`
	LastLogin time.Time              `bun:"lastlogin"`
}

type AccountPermission

type AccountPermission struct {
	bun.BaseModel `bun:"table:sentry_account_permission,alias:sap"`

	AccountId      uuid.UUID       `bun:"account_id,type:uuid"`
	ProjectId      uuid.UUID       `bun:"project_id,type:uuid"`
	GroupId        uuid.UUID       `bun:"group_id,type:uuid"`
	RoleId         uuid.UUID       `bun:"role_id,type:uuid"`
	RoleName       string          `bun:"role_name,type:string"`
	OrganizationId uuid.UUID       `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID       `bun:"partner_id,type:uuid"`
	IsGlobal       bool            `bun:"is_global,notnull,default:true"` // does not matter
	Scope          string          `bun:"scope,notnull"`
	PermissionName string          `bun:"permission_name,type:string"`
	BaseUrl        string          `bun:"base_url,type:string"`
	Urls           json.RawMessage `bun:"urls,type:jsonb"`
}

type AccountResourcerole

type AccountResourcerole struct {
	bun.BaseModel `bun:"table:authsrv_accountresourcerole,alias:accountresourcerole"`

	ID             uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name           string    `bun:"name,notnull"`
	Description    string    `bun:"description,notnull"`
	CreatedAt      time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt     time.Time `bun:"modified_at,notnull,default:current_timestamp"`
	Trash          bool      `bun:"trash,notnull,default:false"`
	Default        bool      `bun:"default,notnull"`
	OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID `bun:"partner_id,type:uuid"`
	RoleId         uuid.UUID `bun:"role_id,type:uuid"`
	AccountId      uuid.UUID `bun:"account_id,type:uuid"`
	Active         bool      `bun:"active,notnull"`
}

type AggregatorData added in v0.1.8

type AggregatorData struct {
	Count int64
	Key   string
}

type ApiKey

type ApiKey struct {
	bun.BaseModel `bun:"table:authsrv_apikey,alias:apikey"`

	ID              uuid.UUID `bun:"id,pk,type:uuid,default:uuid_generate_v4()"`
	Name            string    `bun:"name,notnull"`
	Description     string    `bun:"description,notnull"`
	CreatedAt       time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt      time.Time `bun:"modified_at,default:current_timestamp"`
	Trash           bool      `bun:"trash,notnull,default:false"`
	Key             string    `bun:"key,notnull"`
	AccountID       uuid.UUID `bun:"account_id,type:uuid"`
	OrganizationID  uuid.UUID `bun:"organization_id,type:uuid"`
	PartnerID       uuid.UUID `bun:"partner_id,type:uuid"`
	SecretMigration string    `bun:"secret_migration"`
	Secret          string    `bun:"secret,notnull"`
}

type AuditLog added in v0.1.8

type AuditLog struct {
	bun.BaseModel `bun:"table:audit_logs,alias:auditlog"`

	Tag  string          `bun:"tag,notnull"`
	Time time.Time       `bun:"time,notnull"`
	Data json.RawMessage `bun:"data,type:jsonb,notnull"`
}

type BootstrapAgent

type BootstrapAgent struct {
	bun.BaseModel `bun:"table:sentry_bootstrap_agent,alias:ba"`

	ID             uuid.UUID       `bun:"id,pk,type:uuid,default:uuid_generate_v4()"`
	Name           string          `bun:"name,notnull"`
	OrganizationId uuid.UUID       `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID       `bun:"partner_id,type:uuid"`
	ProjectId      uuid.UUID       `bun:"project_id,type:uuid"`
	TemplateRef    string          `bun:"template_ref,notnull"`
	AgentMode      string          `bun:"agent_mode,notnull"`
	DisplayName    string          `bun:"display_name,notnull"`
	CreatedAt      time.Time       `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt     time.Time       `bun:"modified_at"`
	DeletedAt      time.Time       `bun:"deleted_at"`
	Labels         json.RawMessage `bun:"labels,type:jsonb,notnull,default:'{}'"`
	Annotations    json.RawMessage `bun:"annotations,type:jsonb,notnull,default:'{}'"`
	Token          string          `bun:"token,notnull"`
	TokenState     string          `bun:"token_state,notnull"`
	IPAddress      string          `bun:"ip_address,notnull"`
	LastCheckedIn  time.Time       `bun:"last_checked_in"`
	Fingerprint    string          `bun:"fingerprint,notnull"`
}

type BootstrapAgentTemplate

type BootstrapAgentTemplate struct {
	bun.BaseModel `bun:"table:sentry_bootstrap_agent_template,alias:bat"`

	Name                   string          `bun:"name,pk,notnull"`
	OrganizationId         uuid.UUID       `bun:"organization_id,type:uuid"`
	PartnerId              uuid.UUID       `bun:"partner_id,type:uuid"`
	ProjectId              uuid.UUID       `bun:"project_id,type:uuid"`
	InfraRef               string          `bun:"infra_ref,notnull"`
	DisplayName            string          `bun:"display_name,notnull"`
	CreatedAt              time.Time       `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt             time.Time       `bun:"modified_at"`
	DeletedAt              time.Time       `bun:"deleted_at"`
	Labels                 json.RawMessage `bun:"labels,type:jsonb,notnull,default:'{}'"`
	Annotations            json.RawMessage `bun:"annotations,type:jsonb,notnull,default:'{}'"`
	AutoRegister           bool            `bun:"auto_register,notnull,default:false"`
	IgnoreMultipleRegister bool            `bun:"ignore_multiple_register,notnull,default:false"`
	AutoApprove            bool            `bun:"auto_approve,notnull,default:false"`
	TemplateType           string          `bun:"template_type,notnull"`
	Hosts                  json.RawMessage `bun:"hosts,type:jsonb,notnull,default:'{}'"`
	Token                  string          `bun:"token,notnull"`
	InclusterTemplate      string          `bun:"incluster_template,notnull"`
	OutofclusterTemplate   string          `bun:"outofcluster_template,notnull"`
	Trash                  bool            `bun:"type:bool"`
}

type BootstrapInfra

type BootstrapInfra struct {
	bun.BaseModel `bun:"table:sentry_bootstrap_infra,alias:bi"`

	Name           string          `bun:"name,pk,notnull"`
	OrganizationId uuid.UUID       `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID       `bun:"partner_id,type:uuid"`
	ProjectId      uuid.UUID       `bun:"project_id,type:uuid"`
	DisplayName    string          `bun:"display_name,notnull"`
	CreatedAt      time.Time       `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt     time.Time       `bun:"modified_at"`
	DeletedAt      time.Time       `bun:"deleted_at"`
	Labels         json.RawMessage `bun:"labels,type:jsonb,notnull,default:'{}'"`
	Annotations    json.RawMessage `bun:"annotations,type:jsonb,notnull,default:'{}'"`
	CaCert         string          `bun:"ca_cert,notnull"`
	CaKey          string          `bun:"ca_key,notnull"`
}

type Cluster

type Cluster struct {
	bun.BaseModel `bun:"table:cluster_clusters,alias:cluster"`

	ID                 uuid.UUID       `bun:"id,pk,type:uuid,default:uuid_generate_v4()"`
	OrganizationId     uuid.UUID       `bun:"organization_id,type:uuid"`
	PartnerId          uuid.UUID       `bun:"partner_id,type:uuid"`
	ProjectId          uuid.UUID       `bun:"project_id,type:uuid"`
	MetroId            uuid.UUID       `bun:"metro_id,type:uuid"`
	Name               string          `bun:"name,notnull"`
	Description        string          `bun:"description"`
	DisplayName        string          `bun:"display_name,notnull"`
	CreatedAt          time.Time       `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt         time.Time       `bun:"modified_at,default:current_timestamp"`
	DeletedAt          time.Time       `bun:"deleted_at"`
	Trash              bool            `bun:"trash,notnull,default:false"`
	Labels             json.RawMessage `bun:"labels,type:jsonb,notnull,default:'{}'"`
	Annotations        json.RawMessage `bun:"annotations,type:jsonb,notnull,default:'{}'"`
	BlueprintRef       string          `bun:"blueprint_ref,notnull,default:''"`
	ClusterType        string          `bun:"cluster_type"`
	OverrideSelector   string          `bun:"override_selector,notnull,default:''"`
	Token              string          `bun:"token"`
	Conditions         json.RawMessage `bun:"conditions,type:jsonb,notnull,default:'{}'"`
	PublishedBlueprint string          `bun:"published_blueprint,notnull,default:''"`
	SystemTaskCount    int64           `bun:"system_task_count,notnull,default:0"`
	CustomTaskCount    int64           `bun:"custom_task_count,notnull,default:0"`
	AuxiliaryTaskCount int64           `bun:"auxiliary_task_count,notnull,default:0"`
	Extra              json.RawMessage `bun:"extra,type:jsonb,notnull,default:'{}'"`
	ShareMode          string          `bun:"share_mode,default:'CUSTOM'"`
	ProxyConfig        json.RawMessage `bun:"proxy_config,type:jsonb"`
}

type ClusterNamespace

type ClusterNamespace struct {
	bun.BaseModel `bun:"table:cluster_namespaces,alias:cns"`

	ClusterId  uuid.UUID       `bun:"cluster_id,type:uuid"`
	Name       string          `bun:"name,notnull"`
	Hash       string          `bun:"hash,notnull"`
	DeletedAt  time.Time       `bun:"deleted_at"`
	Type       string          `bun:"type,notnull"`
	Namespace  json.RawMessage `bun:"namespace,type:jsonb,notnull"`
	Conditions json.RawMessage `bun:"conditions,type:jsonb,notnull,default:'[]'"`
	Status     json.RawMessage `bun:"status,type:jsonb,notnull,default:'{}'"`
}

type ClusterOperatorBootstrap

type ClusterOperatorBootstrap struct {
	bun.BaseModel `bun:"table:cluster_operator_bootstrap,alias:operator_bootstrap"`

	ClusterId   uuid.UUID `bun:"cluster_id,type:uuid,notnull"`
	CreatedAt   time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt  time.Time `bun:"modified_at,notnull,default:current_timestamp"`
	Trash       bool      `bun:"trash,notnull,default:false"`
	YamlContent string    `bun:"yaml_content"`
}

type ClusterToken

type ClusterToken struct {
	bun.BaseModel `bun:"table:cluster_tokens,alias:tokens"`

	ID             uuid.UUID       `bun:"id,pk,type:uuid,default:uuid_generate_v4()"`
	Name           string          `bun:"name,notnull"`
	OrganizationId uuid.UUID       `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID       `bun:"partner_id,type:uuid"`
	ProjectId      uuid.UUID       `bun:"project_id,type:uuid"`
	DisplayName    string          `bun:"display_name,notnull"`
	CreatedAt      time.Time       `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt     time.Time       `bun:"modified_at,default:current_timestamp"`
	DeletedAt      time.Time       `bun:"deleted_at"`
	Trash          bool            `bun:"trash,notnull,default:false"`
	Labels         json.RawMessage `bun:"labels,type:jsonb,notnull,default:'{}'"`
	Annotations    json.RawMessage `bun:"annotations,type:jsonb,notnull,default:'{}'"`
	TokenType      string          `bun:"token_type,notnull"`
	State          string          `bun:"state,notnull"`
}

type Group

type Group struct {
	bun.BaseModel `bun:"table:authsrv_group,alias:group"`

	ID             uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name           string    `bun:"name,notnull"`
	Description    string    `bun:"description,notnull"`
	CreatedAt      time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt     time.Time `bun:"modified_at,notnull,default:current_timestamp"`
	Trash          bool      `bun:"trash,notnull,default:false"`
	OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID `bun:"partner_id,type:uuid"`
	Type           string    `bun:"type,notnull"`
}

type GroupAccount

type GroupAccount struct {
	bun.BaseModel `bun:"table:authsrv_groupaccount,alias:groupaccount"`

	ID          uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name        string    `bun:"name,notnull"`
	Description string    `bun:"description,notnull"`
	CreatedAt   time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt  time.Time `bun:"modified_at,notnull,default:current_timestamp"`
	Trash       bool      `bun:"trash,notnull,default:false"`
	AccountId   uuid.UUID `bun:"account_id,type:uuid"`
	GroupId     uuid.UUID `bun:"group_id,type:uuid"`
	Active      bool      `bun:"active,notnull"`

	Account *KratosIdentities `bun:"rel:has-one,join:account_id=id"`
	Group   *Group            `bun:"rel:has-one,join:group_id=id"`
}

type GroupPermission

type GroupPermission struct {
	bun.BaseModel `bun:"table:sentry_group_permission,alias:sgp"`

	GroupId        uuid.UUID       `bun:"group_id,type:uuid"`
	ProjecttId     string          `bun:"project_id"`
	OrganizationId uuid.UUID       `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID       `bun:"partner_id,type:uuid"`
	GroupName      string          `bun:"group_name"`
	RoleName       string          `bun:"role_name"`
	IsGlobal       bool            `bun:"is_global"`
	Scope          string          `bun:"scope"`
	PermissionName string          `bun:"permission_name"`
	BaseUrl        string          `bun:"base_url"`
	Urls           json.RawMessage `bun:"urls,type:jsonb"`
	ProjectName    string          `bun:"project_name"`
}

type GroupRole

type GroupRole struct {
	bun.BaseModel `bun:"table:authsrv_grouprole,alias:grouprole"`

	ID             uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name           string    `bun:"name,notnull"`
	Description    string    `bun:"description,notnull"`
	CreatedAt      time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt     time.Time `bun:"modified_at,notnull,default:current_timestamp"`
	Trash          bool      `bun:"trash,notnull,default:false"`
	Default        bool      `bun:"default,notnull"`
	OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID `bun:"partner_id,type:uuid"`
	RoleId         uuid.UUID `bun:"role_id,type:uuid"`
	GroupId        uuid.UUID `bun:"group_id,type:uuid"`
	Active         bool      `bun:"active,notnull"`
}

type Idp

type Idp struct {
	bun.BaseModel `bun:"table:authsrv_idp,alias:idp"`

	Id          uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name        string    `bun:"name,notnull,unique"`
	Description string    `bun:"description"`
	CreatedAt   time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt  time.Time `bun:"modified_at,notnull,default:current_timestamp"`

	IdpName string `bun:"idp_name,notnull"`
	Domain  string `bun:"domain,notnull,unique"`
	// Deprecated
	// AcsURL             string    `bun:"acs_url,notnull,unique"`
	OrganizationId     uuid.UUID `bun:"organization_id,type:uuid"`
	PartnerId          uuid.UUID `bun:"partner_id,type:uuid"`
	SsoURL             string    `bun:"sso_url"`
	IdpCert            string    `bun:"idp_cert"`
	SpCert             string    `bun:"sp_cert"`
	SpKey              string    `bun:"sp_key"`
	MetadataURL        string    `bun:"metadata_url"`
	MetadataFilename   string    `bun:"metadata_filename"`
	Metadata           []byte    `bun:"metadata"`
	GroupAttributeName string    `bun:"group_attribute_name"`
	SaeEnabled         bool      `bun:"is_sae_enabled"`
	Trash              bool      `bun:"trash,default:false"`
}

type KratosIdentities

type KratosIdentities struct {
	bun.BaseModel `bun:"table:identities,alias:identities"`

	ID                 uuid.UUID                 `bun:"id,type:uuid,pk"`
	SchemaId           string                    `bun:"schema_id,notnull"`
	Traits             map[string]interface{}    `bun:"traits,type:jsonb"`
	CreatedAt          time.Time                 `bun:"created_at,notnull,default:current_timestamp"`
	UpdatedAt          time.Time                 `bun:"updated_at,notnull,default:current_timestamp"`
	State              string                    `bun:"state,notnull"`
	StateChangedAt     time.Time                 `bun:"state_changed_at,notnull,default:current_timestamp"`
	NId                uuid.UUID                 `bun:"nid,type:uuid,pk"`
	IdentityCredential KratosIdentityCredentials `bun:"rel:has-one,join:id=identity_id"`
	MetadataPublic     map[string]interface{}    `bun:"metadata_public,type:jsonb"`
}

type KratosIdentityCredentialTypes

type KratosIdentityCredentialTypes struct {
	bun.BaseModel `bun:"table:identity_credential_types,alias:ict"`

	ID   uuid.UUID `bun:"id,type:uuid,pk"`
	Name string    `bun:"name,type:string"`
}

type KratosIdentityCredentials

type KratosIdentityCredentials struct {
	bun.BaseModel `bun:"table:identity_credentials,alias:ic"`

	ID                       uuid.UUID                     `bun:"id,type:uuid,pk"`
	IdentityID               uuid.UUID                     `bun:"identity_id,type:uuid"`
	IdentityCredentialTypeID uuid.UUID                     `bun:"identity_credential_type_id,type:uuid"`
	IdentityCredentialType   KratosIdentityCredentialTypes `bun:"rel:has-one,join:identity_credential_type_id=id"`
}

type KubeconfigRevocation

type KubeconfigRevocation struct {
	bun.BaseModel `bun:"table:sentry_kubeconfig_revocation,alias:kr"`

	ID             uuid.UUID `bun:"id,pk,type:uuid,default:uuid_generate_v4()"`
	OrganizationId uuid.UUID `bun:"organization_id,notnull,type:uuid"`
	PartnerId      uuid.UUID `bun:"partner_id,type:uuid,notnull"`
	AccountId      uuid.UUID `bun:"account_id,type:uuid,notnull"`
	RevokedAt      time.Time `bun:"revoked_at"`
	CreatedAt      time.Time `bun:"created_at,notnull,default:current_timestamp"`
	IsSSOUser      bool      `bun:"is_sso_user,default:false"`
}

type KubeconfigSetting

type KubeconfigSetting struct {
	bun.BaseModel `bun:"table:sentry_kubeconfig_setting,alias:ks"`

	ID                          uuid.UUID `bun:"id,pk,type:uuid,default:uuid_generate_v4()"`
	OrganizationId              uuid.UUID `bun:"organization_id,notnull,type:uuid"`
	PartnerId                   uuid.UUID `bun:"partner_id,type:uuid,notnull"`
	AccountId                   uuid.UUID `bun:"account_id,type:uuid,notnull"`
	Scope                       string    `bun:"scope,notnull"`
	ValiditySeconds             int64     `bun:"validity_seconds,notnull,default:0"`
	SaValiditySeconds           int64     `bun:"sa_validity_seconds,notnull,default:28800"`
	CreatedAt                   time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt                  time.Time `bun:"modified_at"`
	DeletedAt                   time.Time `bun:"deleted_at"`
	EnforceRsId                 bool      `bun:"enforce_rsid,default:false"`
	DisableAllAudit             bool      `bun:"disable_all_audit,default:false"`
	DisableCmdAudit             bool      `bun:"disable_cmd_audit,default:false"`
	IsSSOUser                   bool      `bun:"is_sso_user,default:false"`
	DisableWebKubectl           bool      `bun:"disable_web_kubectl,default:false"`
	DisableCLIKubectl           bool      `bun:"disable_cli_kubectl,default:false"`
	EnablePrivateRelay          bool      `bun:"enable_privaterelay,default:false"`
	EnforceOrgAdminSecretAccess bool      `bun:"enforce_orgadmin_secret_access,default:false"`
}

type KubectlClusterSetting

type KubectlClusterSetting struct {
	bun.BaseModel `bun:"table:sentry_kubectl_cluster_settings,alias:kc"`

	Name              string    `bun:"name,pk,notnull"`
	OrganizationId    uuid.UUID `bun:"organization_id,notnull,type:uuid"`
	PartnerId         uuid.UUID `bun:"partner_id,type:uuid,notnull"`
	DisableWebKubectl bool      `bun:"disable_web_kubectl,notnull,default:false"`
	DisableCliKubectl bool      `bun:"disable_cli_kubectl,notnull,default:false"`
	CreatedAt         time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt        time.Time `bun:"modified_at"`
	DeletedAt         time.Time `bun:"deleted_at"`
}

type Metro

type Metro struct {
	bun.BaseModel `bun:"table:cluster_metro,alias:metro"`

	ID             uuid.UUID `bun:"id,pk,type:uuid,default:uuid_generate_v4()"`
	Name           string    `bun:"name,notnull"`
	CreatedAt      time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt     time.Time `bun:"modified_at,notnull,default:current_timestamp"`
	Trash          bool      `bun:"trash,notnull,default:false"`
	Latitude       string    `bun:"latitude,notnull"`
	Longitude      string    `bun:"longitude,notnull"`
	City           string    `bun:"city"`
	State          string    `bun:"state"`
	Country        string    `bun:"country"`
	CountryCode    string    `bun:"cc"`
	StateCode      string    `bun:"st"`
	OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID `bun:"partner_id,type:uuid,notnull"`
}

type OIDCProvider

type OIDCProvider struct {
	bun.BaseModel `bun:"table:authsrv_oidc_provider,alias:oidcprovider"`

	Id             uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name           string    `bun:"name,notnull,unique"` // unique constraint on id,name cols group
	Description    string    `bun:"description"`
	OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID `bun:"partner_id,type:uuid"`
	CreatedAt      time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt     time.Time `bun:"modified_at,notnull,default:current_timestamp"`

	ProviderName    string                 `bun:"provider_name,notnull"`
	MapperURL       string                 `bun:"mapper_url"`
	MapperFilename  string                 `bun:"mapper_filename"`
	ClientId        string                 `bun:"client_id,notnull"`
	ClientSecret    string                 `bun:"client_secret,notnull"`
	Scopes          []string               `bun:"scopes,array,notnull"`
	IssuerURL       string                 `bun:"issuer_url,unique,notnull"`
	AuthURL         string                 `bun:"auth_url"`
	TokenURL        string                 `bun:"token_url"`
	RequestedClaims map[string]interface{} `bun:"requested_claims,type:jsonb"`
	Predefined      bool                   `bun:"predefined,notnull"`
	Trash           bool                   `bun:"trash,default:false"`
}

type Organization

type Organization struct {
	bun.BaseModel `bun:"table:authsrv_organization,alias:organization"`

	ID                       uuid.UUID       `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name                     string          `bun:"name,notnull"`
	Description              string          `bun:"description,notnull"`
	CreatedAt                time.Time       `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt               time.Time       `bun:"modified_at,notnull,default:current_timestamp"`
	Trash                    bool            `bun:"trash,notnull"`
	Settings                 json.RawMessage `bun:"settings,notnull,type:jsonb"`
	BillingAddress           string          `bun:"billing_address,notnull,type:text"`
	PartnerId                uuid.UUID       `bun:"partner_id,notnull,type:uuid"`
	Active                   bool            `bun:"active,notnull"`
	Approved                 bool            `bun:"approved,notnull"`
	Type                     string          `bun:"type,notnull"`
	AddressLine1             string          `bun:"address_line1,notnull,type:text"`
	AddressLine2             string          `bun:"address_line2,notnull,type:text"`
	City                     string          `bun:"city,notnull,type:text"`
	Country                  string          `bun:"country,notnull,type:text"`
	Phone                    string          `bun:"phone,notnull,type:text"`
	State                    string          `bun:"state,notnull,type:text"`
	Zipcode                  string          `bun:"zipcode,notnull,type:text"`
	DeletedName              string          `bun:"deleted_name"`
	IsPrivate                bool            `bun:"is_private"`
	IsTOTPEnabled            bool            `bun:"is_totp_enabled,notnull"`
	AreClustersShared        bool            `bun:"are_clusters_shared,notnull"`
	PspsEnabled              bool            `bun:"psps_enabled,default:true"`
	CustomPspsEnabled        bool            `bun:"custom_psps_enabled"`
	DefaultBlueprintsEnabled bool            `bun:"default_blueprints_enabled,default:true"`
	Referer                  string          `bun:"referer"`
}

type Partner

type Partner struct {
	bun.BaseModel `bun:"table:authsrv_partner,alias:partner"`

	ID                        uuid.UUID       `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name                      string          `bun:"name,notnull"`
	Description               string          `bun:"description,notnull"`
	CreatedAt                 time.Time       `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt                time.Time       `bun:"modified_at,notnull,default:current_timestamp"`
	Trash                     bool            `bun:"trash,notnull"`
	Settings                  json.RawMessage `bun:"settings,notnull,type:jsonb"`
	Host                      string          `bun:"host,notnull"`
	Domain                    string          `bun:"domain,notnull"`
	TosLink                   string          `bun:"tos_link,notnull"`
	LogoLink                  string          `bun:"logo_link,notnull"`
	NotificationEmail         string          `bun:"notification_email,notnull"`
	ParentId                  uuid.UUID       `bun:"parent_id,type:uuid"`
	HelpdeskEmail             string          `bun:"partner_helpdesk_email,notnull"`
	ProductName               string          `bun:"partner_product_name"`
	SupportTeamName           string          `bun:"support_team_name,notnull"`
	OpsHost                   string          `bun:"ops_host,notnull"`
	FavIconLink               string          `bun:"fav_icon_link,notnull"`
	IsTOTPEnabled             bool            `bun:"is_totp_enabled,notnull"`
	IsSyntheticPartnerEnabled bool            `bun:"is_synthetic_partner_enabled,notnull"`
}

type Project

type Project struct {
	bun.BaseModel `bun:"table:authsrv_project,alias:project"`

	ID             uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name           string    `bun:"name,notnull"`
	Description    string    `bun:"description,notnull"`
	CreatedAt      time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt     time.Time `bun:"modified_at,notnull,default:current_timestamp"`
	Trash          bool      `bun:"trash,notnull,default:false"`
	OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID `bun:"partner_id,type:uuid"`
	Default        bool      `bun:"default,notnull"`
}

type ProjectAccountNamespaceRole

type ProjectAccountNamespaceRole struct {
	bun.BaseModel `bun:"table:authsrv_projectaccountnamespacerole,alias:projectaccountnamespacerole"`

	ID             uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name           string    `bun:"name,notnull"`
	Description    string    `bun:"description,notnull"`
	CreatedAt      time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt     time.Time `bun:"modified_at,notnull,default:current_timestamp"`
	Trash          bool      `bun:"trash,notnull,default:false"`
	OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID `bun:"partner_id,type:uuid"`
	RoleId         uuid.UUID `bun:"role_id,type:uuid"`
	AccountId      uuid.UUID `bun:"account_id,type:uuid"`
	ProjectId      uuid.UUID `bun:"project_id,type:uuid"`
	Namespace      string    `bun:"namespace"`
	Active         bool      `bun:"active,notnull"`
}

type ProjectAccountResourcerole

type ProjectAccountResourcerole struct {
	bun.BaseModel `bun:"table:authsrv_projectaccountresourcerole,alias:projectaccountresourcerole"`

	ID             uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name           string    `bun:"name,notnull"`
	Description    string    `bun:"description,notnull"`
	CreatedAt      time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt     time.Time `bun:"modified_at,notnull,default:current_timestamp"`
	Trash          bool      `bun:"trash,notnull,default:false"`
	Default        bool      `bun:"default,notnull"`
	OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID `bun:"partner_id,type:uuid"`
	RoleId         uuid.UUID `bun:"role_id,type:uuid"`
	AccountId      uuid.UUID `bun:"account_id,type:uuid"`
	ProjectId      uuid.UUID `bun:"project_id,type:uuid"`
	Active         bool      `bun:"active,notnull"`
}

type ProjectCluster

type ProjectCluster struct {
	bun.BaseModel `bun:"table:cluster_project_cluster,alias:projectcluster"`

	ProjectID uuid.UUID `bun:"project_id,type:uuid,notnull"`
	ClusterID uuid.UUID `bun:"cluster_id,type:uuid,notnull"`
}

type ProjectGroupNamespaceRole

type ProjectGroupNamespaceRole struct {
	bun.BaseModel `bun:"table:authsrv_projectgroupnamespacerole,alias:projectgroupnamespacerole"`

	ID             uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name           string    `bun:"name,notnull"`
	Description    string    `bun:"description,notnull"`
	CreatedAt      time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt     time.Time `bun:"modified_at,notnull,default:current_timestamp"`
	Trash          bool      `bun:"trash,notnull,default:false"`
	OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID `bun:"partner_id,type:uuid"`
	RoleId         uuid.UUID `bun:"role_id,type:uuid"`
	GroupId        uuid.UUID `bun:"group_id,type:uuid"`
	ProjectId      uuid.UUID `bun:"project_id,type:uuid"`
	Namespace      string    `bun:"namespace"`
	Active         bool      `bun:"active,notnull"`
}

type ProjectGroupRole

type ProjectGroupRole struct {
	bun.BaseModel `bun:"table:authsrv_projectgrouprole,alias:projectgrouprole"`

	ID             uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name           string    `bun:"name,notnull"`
	Description    string    `bun:"description,notnull"`
	CreatedAt      time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt     time.Time `bun:"modified_at,notnull,default:current_timestamp"`
	Trash          bool      `bun:"trash,notnull,default:false"`
	Default        bool      `bun:"default,notnull"`
	OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID `bun:"partner_id,type:uuid"`
	RoleId         uuid.UUID `bun:"role_id,type:uuid"`
	GroupId        uuid.UUID `bun:"group_id,type:uuid"`
	ProjectId      uuid.UUID `bun:"project_id,type:uuid"`
	Active         bool      `bun:"active,notnull"`
}

type ResourcePermission

type ResourcePermission struct {
	bun.BaseModel `bun:"table:authsrv_resourcepermission,alias:resourcepermission"`

	ID                 uuid.UUID                `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name               string                   `bun:"name,notnull" json:"name"`
	BaseUrl            string                   `bun:"base_url,notnull" json:"base_url"`
	Description        string                   `bun:"description,notnull"`
	CreatedAt          time.Time                `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt         time.Time                `bun:"modified_at,notnull,default:current_timestamp"`
	Trash              bool                     `bun:"trash,notnull,default:false"`
	ResourceUrls       []map[string]interface{} `bun:"resource_urls,type:jsonb" json:"resource_urls"`
	ResourceActionUrls []map[string]interface{} `bun:"resource_action_urls,type:jsonb" json:"resource_action_urls"`
	Scope              string                   `bun:"scope,notnull"`
}

type ResourceRolePermission

type ResourceRolePermission struct {
	bun.BaseModel `bun:"table:authsrv_resourcerolepermission,alias:resourcerolepermission"`

	ID                   uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name                 string    `bun:"name,notnull" json:"name"`
	Description          string    `bun:"description,notnull"`
	CreatedAt            time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt           time.Time `bun:"modified_at,notnull,default:current_timestamp"`
	Trash                bool      `bun:"trash,notnull,default:false"`
	ResourcePermissionId uuid.UUID `bun:"resource_permission_id,type:uuid"`
	ResourceRoleId       uuid.UUID `bun:"resource_role_id,type:uuid"`
}

type Role

type Role struct {
	bun.BaseModel `bun:"table:authsrv_resourcerole,alias:resourcerole"`

	ID             uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Name           string    `bun:"name,notnull"`
	Description    string    `bun:"description,notnull"`
	CreatedAt      time.Time `bun:"created_at,notnull,default:current_timestamp"`
	ModifiedAt     time.Time `bun:"modified_at,notnull,default:current_timestamp"`
	Trash          bool      `bun:"trash,notnull,default:false"`
	OrganizationId uuid.UUID `bun:"organization_id,type:uuid"`
	PartnerId      uuid.UUID `bun:"partner_id,type:uuid"`
	IsGlobal       bool      `bun:"is_global,notnull,default:true"`
	Builtin        bool      `bun:"builtin,notnull,default:true"`
	Scope          string    `bun:"scope,notnull"`
}

type SSOAccountGroupProjectRole

type SSOAccountGroupProjectRole struct {
	bun.BaseModel `bun:"table:sentry_ssoaccount_group_project_roles,alias:acc"`

	Id                    uuid.UUID `bun:"id,type:uuid"`
	Username              string    `bun:"username"`
	RoleName              string    `bun:"role_name"`
	ProjectId             string    `bun:"project_id"`
	ProjectName           string    `bun:"project_name"`
	GroupName             string    `bun:"group_name"`
	AccountOrganizationId uuid.UUID `bun:"account_organization_id,type:uuid"`
	OrganizationId        uuid.UUID `bun:"organization_id,type:uuid"`
	PartnerId             uuid.UUID `bun:"partner_id,type:uuid"`
	Scope                 string    `bun:"scope"`
	LastLogin             time.Time `bun:"last_login"`
	CreatedAt             time.Time `bun:"created_at"`
	FirstName             string    `bun:"first_name"`
	LastName              string    `bun:"last_name"`
	Phone                 string    `bun:"phone"`
	Name                  string    `bun:"name"`
	LastLogout            time.Time `bun:"last_logout"`
}

Jump to

Keyboard shortcuts

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