Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateTaskRequest ¶ added in v1.2.0
type CreateUserRequest ¶ added in v1.2.0
type CreateWebhookRequest ¶ added in v1.2.0
type LoginUserRequest ¶ added in v1.2.0
type Task ¶
type Task struct {
ID uint `json:"id" gorm:"primaryKey"`
Webhook *Webhook `json:"webhook" gorm:"foreignKey:WebhookID;constraint:OnDelete:CASCADE;"`
WebhookID uint `json:"-"`
Name string `json:"name" gorm:"size:255"`
Service string `json:"service" gorm:"size:255"`
ServiceParams map[string]interface{} `json:"service_params" gorm:"-"`
ServiceParamsDB string `json:"-"` // Database field
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
func (*Task) Update ¶ added in v1.2.0
func (t *Task) Update(request UpdateTaskRequest)
type UpdateRequest ¶ added in v1.2.0
type UpdateResult ¶
type UpdateTaskRequest ¶ added in v1.2.0
type UpdateWebhookRequest ¶ added in v1.2.0
type User ¶
type User struct {
ID uuid.UUID `json:"id" gorm:"primaryKey"`
Username string `json:"username" gorm:"unique;size:255" binding:"required"`
Password string `json:"password,omitempty" gorm:"size:255" binding:"required"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
func (User) MarshalJSON ¶
type Webhook ¶
type Webhook struct {
ID uint `json:"id" gorm:"primaryKey"`
Name string `json:"name" gorm:"size:255"`
Owner uuid.UUID `json:"user_id" gorm:"not null"`
Token string `json:"token" gorm:"size:255"`
IPv4 string `json:"ipv4" gorm:"size:255"`
IPv6 string `json:"ipv6" gorm:"size:255"`
Tasks []Task `json:"tasks" gorm:"foreignKey:WebhookID;constraint:OnDelete:CASCADE;"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
func (*Webhook) Update ¶ added in v1.2.0
func (w *Webhook) Update(request UpdateWebhookRequest)
Click to show internal directories.
Click to hide internal directories.