Documentation
¶
Index ¶
- type AlertEndpoints
- type Alerts
- type Audit
- type AuditWithUser
- type ExecutionSteps
- type Executions
- type Flows
- type IncExpireTokenRequest
- type IncomingGroupedAlertsRequest
- type JWTClaim
- type JWTProjectClaim
- type JWTProjectRunnerClaim
- type Notifications
- type Pattern
- type PlanCountStats
- type ProjectMembers
- type ProjectMembersWithUserData
- type Projects
- type RoleCountStats
- type Runners
- type Settings
- type Stats
- type StatsAlertExecutions
- type StatsAlertExecutionsTotals
- type SubAlerts
- type Tokens
- type Trend
- type Users
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertEndpoints ¶
type Alerts ¶
type Alerts struct {
bun.BaseModel `bun:"table:alerts"`
ID uuid.UUID `bun:",pk,type:uuid,default:gen_random_uuid()" json:"id"`
Name string `bun:"name,type:text,default:''" json:"name"`
Status string `bun:"status,type:text,default:''" json:"status"`
Payload json.RawMessage `bun:"payload,type:jsonb,default:jsonb('[]')" json:"payload"`
FlowID string `bun:"flow_id,type:text,default:''" json:"flow_id"`
ExecutionID string `bun:"execution_id,type:text,default:''" json:"execution_id"`
RunnerID string `bun:"runner_id,type:text,default:''" json:"runner_id"`
ParentID string `bun:"parent_id,type:text,default:''" json:"parent_id"`
Plugin string `bun:"plugin,type:text,default:''" json:"plugin"`
CreatedAt time.Time `bun:"created_at,type:timestamptz,default:now()" json:"created_at"`
Encrypted bool `bun:"encrypted,type:bool,default:false" json:"encrypted"`
UpdatedAt time.Time `bun:"updated_at,type:timestamptz" json:"updated_at"`
ResolvedAt time.Time `bun:"resolved_at,type:timestamptz" json:"resolved_at"`
GroupKey string `bun:"group_key,type:text,default:''" json:"group_key"`
SubAlerts []SubAlerts `bun:"sub_alerts,type:jsonb,default:jsonb('[]')" json:"sub_alerts"`
Note string `bun:"note,type:text,default:''" json:"note"`
}
type Audit ¶
type Audit struct {
bun.BaseModel `bun:"table:audit"`
ID uuid.UUID `bun:",pk,type:uuid,default:gen_random_uuid()" json:"id"`
ProjectID string `bun:"project_id,type:text,notnull" json:"project_id"`
UserID string `bun:"user_id,type:text,notnull" json:"user_id"`
Operation string `bun:"operation,type:text,notnull" json:"operation"`
Details string `bun:"details,type:text,default:''" json:"details"`
CreatedAt time.Time `bun:"created_at,type:timestamptz,default:now()" json:"created_at"`
}
type AuditWithUser ¶
type AuditWithUser struct {
bun.BaseModel `bun:"table:audit"`
ID uuid.UUID `bun:",pk,type:uuid,default:gen_random_uuid()" json:"id"`
ProjectID string `bun:"project_id,type:text,notnull" json:"project_id"`
UserID string `bun:"user_id,type:text,notnull" json:"user_id"`
Operation string `bun:"operation,type:text,notnull" json:"operation"`
Details string `bun:"details,type:text,default:''" json:"details"`
CreatedAt time.Time `bun:"created_at,type:timestamptz,default:now()" json:"created_at"`
Username string `bun:"username,type:text" json:"username"`
Email string `bun:"email,type:text" json:"email"`
Role string `bun:"role,type:text" json:"role"`
}
type ExecutionSteps ¶
type ExecutionSteps struct {
shared_models.ExecutionSteps
}
type Executions ¶
type Executions struct {
shared_models.Executions
AlertID string `bun:"alert_id,type:text,default:''" json:"alert_id"`
}
type Flows ¶
type Flows struct {
shared_models.Flows
Patterns []Pattern `bun:"type:jsonb,default:jsonb('[]')" json:"patterns"`
EncryptAlerts bool `bun:"encrypt_alerts,type:bool,default:true" json:"encrypt_alerts"`
GroupAlerts bool `bun:"group_alerts,type:bool,default:true" json:"group_alerts"`
GroupAlertsIdentifier string `bun:"group_alerts_identifier,type:text,default:''" json:"group_alerts_identifier"`
AlertThreshold int `bun:"alert_threshold,type:int,default:0" json:"alert_threshold"`
}
type IncExpireTokenRequest ¶
type JWTClaim ¶
type JWTClaim struct {
ID uuid.UUID `json:"id"`
Type string `json:"type"`
jwt.RegisteredClaims
}
type JWTProjectClaim ¶
type JWTProjectRunnerClaim ¶
type Notifications ¶
type Notifications struct {
bun.BaseModel `bun:"table:notifications"`
ID uuid.UUID `bun:",pk,type:uuid,default:gen_random_uuid()" json:"id"`
UserID string `bun:"user_id,type:text,notnull" json:"user_id"`
Title string `bun:"title,type:text,notnull" json:"title"`
Body string `bun:"body,type:text,default:''" json:"body"`
IsRead bool `bun:"is_read,type:bool,default:false" json:"is_read"`
IsArchived bool `bun:"is_archived,type:bool,default:false" json:"is_archived"`
Icon string `bun:"icon,type:text,default:''" json:"icon"`
Color string `bun:"color,type:text,default:'primary'" json:"color"`
Link string `bun:"link,type:text,default:''" json:"link"`
LinkText string `bun:"link_text,type:text,default:''" json:"link_text"`
CreatedAt time.Time `bun:"created_at,type:timestamptz,default:now()" json:"created_at"`
}
type PlanCountStats ¶
type ProjectMembers ¶
type ProjectMembers struct {
bun.BaseModel `bun:"table:project_members"`
ID uuid.UUID `bun:",pk,type:uuid,default:gen_random_uuid()" json:"id"`
UserID string `bun:"user_id,type:text,notnull" json:"user_id"`
ProjectID string `bun:"project_id,type:text,notnull" json:"project_id"`
Role string `bun:"role,type:text,notnull" json:"role"`
Disabled bool `bun:"disabled,type:bool,default:false" json:"disabled"`
DisabledReason string `bun:"disabled_reason,type:text,default:''" json:"disabled_reason"`
InvitePending bool `bun:"invite_pending,type:bool,default:false" json:"invite_pending"`
InvitedAt time.Time `bun:"invited_at,type:timestamptz,default:now()" json:"invited_at"`
}
type ProjectMembersWithUserData ¶
type ProjectMembersWithUserData struct {
bun.BaseModel `bun:"table:project_members"`
ID uuid.UUID `bun:",pk,type:uuid,default:gen_random_uuid()" json:"id"`
UserID string `bun:"user_id,type:text,notnull" json:"user_id"`
ProjectID string `bun:"project_id,type:text,notnull" json:"project_id"`
Role string `bun:"role,type:text,notnull" json:"role"`
Disabled bool `bun:"disabled,type:bool,default:false" json:"disabled"`
DisabledReason string `bun:"disabled_reason,type:text,default:''" json:"disabled_reason"`
InvitePending bool `bun:"invite_pending,type:bool,default:false" json:"invite_pending"`
InvitedAt time.Time `bun:"invited_at,type:timestamptz,default:now()" json:"invited_at"`
Username string `bun:"username,type:text" json:"username"`
Email string `bun:"email,type:text" json:"email"`
}
type Projects ¶
type Projects struct {
bun.BaseModel `bun:"table:projects"`
ID uuid.UUID `bun:",pk,type:uuid,default:gen_random_uuid()" json:"id"`
Name string `bun:"name,type:text,notnull" json:"name"`
Description string `bun:"description,type:text,default:''" json:"description"`
Color string `bun:"color,type:text,default:''" json:"color"`
Icon string `bun:"icon,type:text,default:''" json:"icon"`
Disabled bool `bun:"disabled,type:bool,default:false" json:"disabled"`
DisabledReason string `bun:"disabled_reason,type:text,default:''" json:"disabled_reason"`
CreatedAt time.Time `bun:"created_at,type:timestamptz,default:now()" json:"created_at"`
EnableAutoRunners bool `bun:"enable_auto_runners,type:bool,default:false" json:"enable_auto_runners"`
DisableRunnerJoin bool `bun:"disable_runner_join,type:bool,default:false" json:"disable_runner_join"`
RunnerAutoJoinToken string `bun:"runner_auto_join_token,type:text,notnull" json:"runner_auto_join_token"`
}
type RoleCountStats ¶
type Runners ¶
type Runners struct {
shared_models.Runners
}
type Settings ¶
type Settings struct {
bun.BaseModel `bun:"table:settings"`
Maintenance bool `bun:"maintenance,type:bool,default:false" json:"maintenance"`
SignUp bool `bun:"signup,type:bool,default:true" json:"signup"`
CreateProjects bool `bun:"create_projects,type:bool,default:true" json:"create_projects"`
CreateFlows bool `bun:"create_flows,type:bool,default:true" json:"create_flows"`
CreateRunners bool `bun:"create_runners,type:bool,default:true" json:"create_runners"`
CreateApiKeys bool `bun:"create_api_keys,type:bool,default:true" json:"create_api_keys"`
AddProjectMembers bool `bun:"add_project_members,type:bool,default:true" json:"add_project_members"`
AddFlowActions bool `bun:"add_flow_actions,type:bool,default:true" json:"add_flow_actions"`
StartExecutions bool `bun:"start_executions,type:bool,default:true" json:"start_executions"`
ReceiveAlerts bool `bun:"receive_alerts,type:bool,default:true" json:"receive_alerts"`
ID int `bun:"id,type:integer,pk,default:1" json:"id"`
}
type StatsAlertExecutions ¶
type Tokens ¶
type Tokens struct {
bun.BaseModel `bun:"table:tokens"`
ID uuid.UUID `bun:",pk,type:uuid,default:gen_random_uuid()" json:"id"`
ProjectID string `bun:"project_id,type:text,default:''" json:"project_id"`
Key string `bun:"key,type:text,notnull" json:"key"`
Description string `bun:"description,type:text,default:''" json:"description"`
Type string `bun:"type,type:text,notnull" json:"type"`
Disabled bool `bun:"disabled,type:bool,default:false" json:"disabled"`
DisabledReason string `bun:"disabled_reason,type:text,default:''" json:"disabled_reason"`
CreatedAt time.Time `bun:"created_at,type:timestamptz,default:now()" json:"created_at"`
ExpiresAt time.Time `bun:"expires_at,type:timestamptz" json:"expires_at"`
UserID string `bun:"user_id,type:text,default:''" json:"user_id"`
}
type Users ¶
type Users struct {
bun.BaseModel `bun:"table:users"`
ID uuid.UUID `bun:",pk,type:uuid,default:gen_random_uuid()" json:"id"`
Username string `bun:"username,type:text,notnull" json:"username"`
Email string `bun:"email,type:text,notnull" json:"email"`
EmailVerified bool `bun:"email_verified,type:bool,default:false" json:"email_verified"`
Welcomed bool `bun:"welcomed,type:bool,default:false" json:"welcomed"`
Password string `bun:"password,type:text,notnull" json:"password"`
Role string `bun:"role,type:text,notnull,default:'user'" json:"role"`
Plan string `bun:"plan,type:text,notnull,default:'hobby'" json:"plan"`
CustomerID string `bun:"customer_id,type:text,default:''" json:"customer_id"`
DefaultCard string `bun:"default_card,type:text,default:''" json:"default_card"`
SubscriptionID string `bun:"subscription_id,type:text,default:''" json:"subscription_id"`
PriceID string `bun:"price_id,type:text,default:''" json:"price_id"`
PlanValidUntil time.Time `bun:"plan_valid_until,type:timestamptz" json:"plan_valid_until"`
Disabled bool `bun:"disabled,type:bool,default:false" json:"disabled"`
DisabledReason string `bun:"disabled_reason,type:text,default:''" json:"disabled_reason"`
CreatedAt time.Time `bun:"created_at,type:timestamptz,default:now()" json:"created_at"`
UpdatedAt time.Time `bun:"updated_at,type:timestamptz" json:"updated_at"`
}
func (*Users) CheckPassword ¶
func (*Users) HashPassword ¶
Click to show internal directories.
Click to hide internal directories.