Documentation ¶
Index ¶
Constants ¶
View Source
const ( RoleReader UserRole = "read" RoleWriter = "write" RoleOwner = "owner" )
View Source
const ( GitHubAccountType AccountType = "github" GitLabAccountType = "gitlab" CustomAccountType = "custom" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountType ¶
type AccountType string
type AddVariablePayload ¶
type AddVariablePayload struct { VarName string `json:"var_name"` UserEnvValue []struct { UserID string `json:"user_id"` Environment string `json:"environment"` Value []byte `json:"value"` } `json:"user_env_value"` }
func (*AddVariablePayload) Deserialize ¶
func (avp *AddVariablePayload) Deserialize(in io.Reader) error
func (*AddVariablePayload) Serialize ¶
func (avp *AddVariablePayload) Serialize(out *string) error
type Environment ¶
type Environment struct { ID uint `json:"id" gorm:"primaryKey"` Name string `json:"name" gorm:"not null"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func (*Environment) BeforeCreate ¶
func (e *Environment) BeforeCreate(tx *gorm.DB) (err error)
func (*Environment) BeforeUpdate ¶
func (e *Environment) BeforeUpdate(tx *gorm.DB) (err error)
func (*Environment) Deserialize ¶
func (e *Environment) Deserialize(in io.Reader) error
func (*Environment) Serialize ¶
func (u *Environment) Serialize(out *string) error
type EnvironmentUserSecret ¶
type EnvironmentUserSecret struct { EnvironmentID uint `json:"environmentID" gorm:"primaryKey"` UserID uint `json:"userID" gorm:"primaryKey"` SecretID uint `json:"secretID" gorm:"primaryKey"` Value []byte `json:"value"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
func (*EnvironmentUserSecret) BeforeCreate ¶
func (eus *EnvironmentUserSecret) BeforeCreate(tx *gorm.DB) (err error)
func (*EnvironmentUserSecret) BeforeUpdate ¶
func (eus *EnvironmentUserSecret) BeforeUpdate(tx *gorm.DB) (err error)
func (*EnvironmentUserSecret) Deserialize ¶
func (eus *EnvironmentUserSecret) Deserialize(in io.Reader) error
func (*EnvironmentUserSecret) Serialize ¶
func (pes *EnvironmentUserSecret) Serialize(out *string) error
type LoginPayload ¶
type LoginPayload struct { AccountType AccountType Token *oauth2.Token PublicKey []byte }
type LoginRequest ¶
type LoginRequest struct { ID uint `json:"id" gorm:"primaryKey"` TemporaryCode string `json:"temporary_code" gorm:"not null"` AuthCode string `json:"auth_code"` Answered bool `json:"answered" gorm:"default:false"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func NewLoginRequest ¶
func NewLoginRequest() LoginRequest
func (*LoginRequest) BeforeCreate ¶
func (lr *LoginRequest) BeforeCreate(tx *gorm.DB) (err error)
func (*LoginRequest) BeforeUpdate ¶
func (lr *LoginRequest) BeforeUpdate(tx *gorm.DB) (err error)
func (*LoginRequest) Deserialize ¶
func (lr *LoginRequest) Deserialize(in io.Reader) error
func (*LoginRequest) Serialize ¶
func (lr *LoginRequest) Serialize(out *string) error
type Message ¶
type Message struct { ID uint `json:"id" gorm:"primaryKey"` Payload []byte `json:"payload"` Sender ProjectMember `json:"sender"` Recipient ProjectMember `json:"recipient"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type Project ¶
type ProjectMember ¶
type ProjectMember struct { ID uint `json:"id" gorm:"primaryKey"` Role UserRole `json:"role" gorm:"type:user_role"` ProjectOwner bool `json:"project_owner"` User User `json:"user"` Environment Environment `json:"environment"` Project Project `json:"project"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func (*ProjectMember) BeforeCreate ¶
func (pm *ProjectMember) BeforeCreate(tx *gorm.DB) (err error)
func (*ProjectMember) BeforeUpdate ¶
func (pm *ProjectMember) BeforeUpdate(tx *gorm.DB) (err error)
func (*ProjectMember) Deserialize ¶
func (pm *ProjectMember) Deserialize(in io.Reader) error
func (*ProjectMember) Serialize ¶
func (pm *ProjectMember) Serialize(out *string) error
type Secret ¶
type SecretType ¶
type SecretType string
const ( SecretString SecretType = "string" SecretFile = "file" )
type SetVariablePayload ¶
type SetVariablePayload struct { VarName string `json:"var_name"` UserValue []struct { UserID string `json:"user_id"` Value []byte `json:"value"` } `json:"user_env_value"` }
func (*SetVariablePayload) Deserialize ¶
func (svp *SetVariablePayload) Deserialize(in io.Reader) error
func (*SetVariablePayload) Serialize ¶
func (svp *SetVariablePayload) Serialize(out *string) error
type User ¶
type User struct { ID uint `json:"id" gorm:"primaryKey"` AccountType AccountType `json:"account_type" gorm:"default:custom"` UserID string `json:"user_id" gorm:"uniqueIndex"` ExtID string `json:"ext_id"` Username string `json:"username" gorm:"uniqueIndex"` Fullname string `json:"fullname" gorm:"not null"` Email string `json:"email" gorm:"not null"` PublicKey []byte `json:"public_key"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type UserPublicKey ¶
func (*UserPublicKey) Deserialize ¶
func (upk *UserPublicKey) Deserialize(in io.Reader) error
func (UserPublicKey) Serialize ¶
func (upk UserPublicKey) Serialize(out *string) error
Click to show internal directories.
Click to hide internal directories.