Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func IsValidationError ¶ added in v1.12.1
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *gorm.DB) *Repository
func (*Repository) Delete ¶
func (r *Repository) Delete(filters ...SelectFilter) error
func (*Repository) Replace ¶
func (r *Repository) Replace(webhook *Webhook) error
func (*Repository) Select ¶
func (r *Repository) Select(filters ...SelectFilter) ([]*Webhook, error)
type SelectFilter ¶
type SelectFilter func(*selectFilter)
func WithExtID ¶
func WithExtID(extID string) SelectFilter
func WithUserID ¶
func WithUserID(userID string) SelectFilter
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(params ServiceParams) *Service
type ServiceParams ¶
type ValidationError ¶ added in v1.12.1
func (ValidationError) Error ¶ added in v1.12.1
func (e ValidationError) Error() string
func (ValidationError) Unwrap ¶ added in v1.12.1
func (e ValidationError) Unwrap() error
type Webhook ¶
type Webhook struct { ID uint64 `json:"-" gorm:"->;primaryKey;type:BIGINT UNSIGNED;autoIncrement"` ExtID string `json:"id" gorm:"not null;type:varchar(36);uniqueIndex:unq_webhooks_user_extid,priority:2"` UserID string `json:"-" gorm:"<-:create;not null;type:varchar(32);uniqueIndex:unq_webhooks_user_extid,priority:1"` URL string `json:"url" validate:"required,http_url" gorm:"not null;type:varchar(256)"` Event webhooks.EventType `json:"event" gorm:"not null;type:varchar(32)"` User models.User `gorm:"foreignKey:UserID;constraint:OnDelete:CASCADE"` models.TimedModel }
Click to show internal directories.
Click to hide internal directories.