Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Method ¶
type Method struct {
gorm.Model `json:"-"`
Name string `gorm:"not null;index" json:"name" validate:"camelCase,required" example:"MethodName"`
Params Params `gorm:"not null" validate:"required" json:"params" example:"string, string, int"`
Description string `gorm:"not null" validate:"required" json:"description" example:"This method does an operation"`
ResultStructure ResultStructure `gorm:"not null" validate:"required" json:"result_structure" example:"{ \"key\": \"value\" }"`
Kind MethodKind `gorm:"not null;default:concurrent" validate:"required" json:"kind" example:"concurrent"`
}
type MethodKind ¶
type MethodKind byte
const ( Broadcast MethodKind = iota Concurrent Indepotent Exchange )
func (*MethodKind) GormDataType ¶
func (m *MethodKind) GormDataType() string
func (MethodKind) MarshalJSON ¶
func (m MethodKind) MarshalJSON() ([]byte, error)
func (*MethodKind) Scan ¶
func (m *MethodKind) Scan(src any) error
func (MethodKind) String ¶
func (m MethodKind) String() string
func (*MethodKind) UnmarshalJSON ¶
func (m *MethodKind) UnmarshalJSON(b []byte) error
type MethodProvider ¶
type Provider ¶
type Provider struct {
gorm.Model `json:"-"`
Name string `gorm:"not null" validate:"required" json:"name" example:"Example LTDA"`
Contact string `json:"contact,omitempty" example:"some@email.com"`
Slug string `gorm:"not null;uniqueIndex" validate:"required,lowercase" json:"slug" example:"provider-slug"`
Webhook string `gorm:"not null" validate:"required,url" json:"webhook" example:"https://provider.com/webhook"`
Secret string `gorm:"not null" validate:"required" json:"secret"`
}
type ReqPayload ¶
type ResultStructure ¶
func (*ResultStructure) GormDBDataType ¶
func (*ResultStructure) GormDataType ¶
func (r *ResultStructure) GormDataType() string
Click to show internal directories.
Click to hide internal directories.