schema

package
v0.0.0-...-fd752eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultPaginationLimit ...
	DefaultPaginationLimit = 10
	// MaxPaginationLimit ...
	MaxPaginationLimit = 100
)
View Source
var (
	// ContentTypeNull ...
	ContentTypeNull = &ContentType{value: "null",
		encoder: func(writer http.ResponseWriter) Encoder {
			return nil
		},
		decoder: func(request *http.Request) Decoder {
			return nil
		},
		errParser: func(e error) error {
			return e
		}}
	// ContentTypeJSON ...
	ContentTypeJSON = &ContentType{value: "application/json",
		encoder: func(writer http.ResponseWriter) Encoder {
			return json.NewEncoder(writer)
		},
		decoder: func(request *http.Request) Decoder {
			dec := json.NewDecoder(request.Body)
			dec.DisallowUnknownFields()
			return dec
		},
		errParser: jsonErrorParser,
	}
	// ContentTypeYAML ...
	ContentTypeYAML = &ContentType{value: "application/yaml",
		encoder: func(writer http.ResponseWriter) Encoder {
			return yaml.NewEncoder(writer)
		},
		decoder: func(request *http.Request) Decoder {
			return yaml.NewDecoder(request.Body)
		},
		errParser: yamlErrorParser,
	}
	// ContentTypeDefault ...
	ContentTypeDefault = ContentTypeJSON
)
View Source
var (
	// TokenExpiration ...
	TokenExpiration = time.Hour * 24 * 7
	// TokenAlgorithm ...
	TokenAlgorithm = "HS256"
)
View Source
var (
	// DefaultAuthFailureMessage default message for auth error
	DefaultAuthFailureMessage = "Incorrect email or password"
)
View Source
var (
	// ReservedRoles ...
	ReservedRoles = []string{"default", "admin"}
)

Functions

func Dump

func Dump(schema Response, r *http.Request, w http.ResponseWriter) error

Dump ...

func ErrContentType

func ErrContentType(contentType string) error

ErrContentType ...

func ErrFieldsRequired

func ErrFieldsRequired(params ...string) error

ErrFieldsRequired ...

func ErrInvalidData

func ErrInvalidData(name string, value interface{}) error

ErrInvalidData ...

func ErrLogin

func ErrLogin(format string, v ...interface{}) error

ErrLogin login error

func ErrMalformedData

func ErrMalformedData(e error, format string, v ...interface{}) error

ErrMalformedData ...

func ErrMethodNotAllowed

func ErrMethodNotAllowed(method string) error

ErrMethodNotAllowed ...

func ErrNotFound

func ErrNotFound(objType, key, id interface{}) error

ErrNotFound ...

func ErrNotSaved

func ErrNotSaved(obj interface{}) error

ErrNotSaved ...

func ErrNullData

func ErrNullData() error

ErrNullData ...

func ErrNullObject

func ErrNullObject(obj string) error

ErrNullObject ...

func ErrOperationNotAuthorized

func ErrOperationNotAuthorized(operation, obj, id string) error

ErrOperationNotAuthorized ...

func ErrOperationNotSupported

func ErrOperationNotSupported(operation, obj string) error

ErrOperationNotSupported ...

func ErrParamsRequired

func ErrParamsRequired(params ...string) error

ErrParamsRequired ...

func ErrReadOnly

func ErrReadOnly(objType, field string) error

ErrReadOnly ...

func ErrTokenMissing

func ErrTokenMissing() error

ErrTokenMissing ...

func ErrTokenType

func ErrTokenType() error

ErrTokenType ...

func Load

func Load(schema Request, r *http.Request) error

Load ...

Types

type AppRequestSchema

type AppRequestSchema struct {
	Name        *string `json:"name,omitempty"  yaml:"name,omitempty"  createValidate:"required" validate:"omitempty,min=1,max=512,alpha"`
	Description *string `json:"description,omitempty" yaml:"description,omitempty" validate:"omitempty,min=1,max=1024"`
	Customer    *string `json:"customer,omitempty" yaml:"customer,omitempty" createValidate:"omitempty,mongoobjectid"`
	Active      *bool   `json:"active,omitempty" yaml:"active,omitempty"`
}

AppRequestSchema app request

func (*AppRequestSchema) Save

func (app *AppRequestSchema) Save(update bool, model *db.App) error

Save ...

func (*AppRequestSchema) Validate

func (app *AppRequestSchema) Validate(update bool, model *db.App) error

Validate ...

type AppResponseSchema

type AppResponseSchema struct {
	ID          string    `json:"id" yaml:"id"`
	Name        string    `json:"name,omitempty" yaml:"name,omitempty"`
	Active      bool      `json:"active,omitempty" yaml:"active,omitempty"`
	Description string    `json:"description,omitempty" yaml:"description,omitempty"`
	Customer    string    `json:"customer,omitempty" yaml:"customer,omitempty"`
	CreatedAt   time.Time `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	UpdatedAt   time.Time `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
}

AppResponseSchema ...

func (*AppResponseSchema) Load

func (app *AppResponseSchema) Load(model *db.App) error

Load ...

type AuthProvider

type AuthProvider interface {
	AccessKey() string
	GetUserID() string
	GetCustomerID() string
	GetSecret() string
	GetAppID() string
	IsAdmin() bool
}

AuthProvider ...

type AuthRequestSchema

type AuthRequestSchema struct {
	User   *string  `json:"user,omitempty" yaml:"user,omitempty" createValidate:"excluded_with=App,omitempty,mongoobjectid"`
	App    *string  `json:"app,omitempty" yaml:"app,omitempty" createValidate:"excluded_with=User,omitempty,mongoobjectid"`
	Active *bool    `json:"active,omitempty" yaml:"active,omitempty"`
	Secret *string  `json:"secret,omitempty" yaml:"secret,omitempty" validate:"omitempty,alnum,min=8,max=2048"`
	Revoke []string `json:"revoked,omitempty" yaml:"revoked,omitempty"`
}

AuthRequestSchema ...

func (*AuthRequestSchema) Save

func (auth *AuthRequestSchema) Save(update bool, model *db.Auth) error

Save ...

func (*AuthRequestSchema) Validate

func (auth *AuthRequestSchema) Validate(update bool, model *db.Auth) error

Validate ...

type AuthResponseSchema

type AuthResponseSchema struct {
	ID         string    `json:"id,omitempty" yaml:"id,omitempty"`
	AccessKey  string    `json:"access_key,omitempty" yaml:"access_key,omitempty"`
	UserID     string    `json:"user,omitempty" yaml:"user,omitempty"`
	CustomerID string    `json:"customer,episodesCollectionomitempty" yaml:"customer,omitempty"`
	AppID      string    `json:"app,omitempty" yaml:"app,omitempty"`
	Active     bool      `json:"active,omitempty" yaml:"active,omitempty"`
	Secret     string    `json:"secret,omitempty" yaml:"secret,omitempty"`
	CreatedAt  time.Time `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	UpdatedAt  time.Time `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
}

AuthResponseSchema ...

func (*AuthResponseSchema) Load

func (auth *AuthResponseSchema) Load(model *db.Auth) error

Load ...

type ContentType

type ContentType struct {
	// contains filtered or unexported fields
}

ContentType ...

func (*ContentType) Decoder

func (c *ContentType) Decoder(request *http.Request) Decoder

Decoder get decoder

func (*ContentType) Encoder

func (c *ContentType) Encoder(writer http.ResponseWriter) Encoder

Encoder get encoder

func (*ContentType) IsNull

func (c *ContentType) IsNull() bool

IsNull check is null content type

func (*ContentType) Value

func (c *ContentType) Value() string

Value get value

func (*ContentType) Write

func (c *ContentType) Write(writer http.ResponseWriter, opts ...string)

Write write content type

type CounterRequestSchema

type CounterRequestSchema struct {
	Subscription *int64 `json:"subscription,omitempty" yaml:"subscription,omitempty"`
	Bandwidth    *int64 `json:"bandwidth,omitempty" yaml:"bandwidth,omitempty"`
}

CounterRequestSchema ..

func (*CounterRequestSchema) Save

func (counter *CounterRequestSchema) Save(update bool, model *db.Counter) error

Save ...

func (*CounterRequestSchema) Validate

func (counter *CounterRequestSchema) Validate(update bool, model *db.Counter) error

Validate ...

type CounterResponseSchema

type CounterResponseSchema struct {
	ID           string `json:"id" yaml:"id"`
	Subscription int64  `json:"subscription" yaml:"subscription"`
	Bandwidth    int64  `json:"bandwidth" yaml:"bandwidth"`
}

CounterResponseSchema ...

func (*CounterResponseSchema) Load

func (counter *CounterResponseSchema) Load(model *db.Counter) error

Load ...

type Credentials

type Credentials struct {
	Key    string `json:"key,omitempty" yaml:"key,omitempty"`
	Secret string `json:"secret,omitempty" yaml:"secret,omitempty"`
}

Credentials for upload

type CustomerRequestSchema

type CustomerRequestSchema struct {
	User    *string  `json:"user,omitempty" yaml:"user,omitempty" createValidate:"required,mongoobjectid" validate:"omitempty,mongoobjectid"`
	Active  *bool    `json:"active,omitempty" yaml:"active,omitempty" `
	Plan    *Plan    `json:"plan,omitempty" yaml:"plan,omitempty"`
	Webhook *Webhook `json:"webhook,omitempty" yaml:"webhook,omitempty"`
}

CustomerRequestSchema request customer

func (*CustomerRequestSchema) Save

func (customer *CustomerRequestSchema) Save(update bool, model *db.Customer) error

Save ...

func (*CustomerRequestSchema) Validate

func (customer *CustomerRequestSchema) Validate(update bool, model *db.Customer) error

Validate ...

type CustomerResponseSchema

type CustomerResponseSchema struct {
	ID     string `json:"id" json:"id"`
	User   string `json:"user,omitempty" yaml:"user,omitempty"`
	Active bool   `json:"active,omitempty" yaml:"active,omitempty"`
	Plan   *Plan  `json:"plan,omitempty" yaml:"plan,omitempty"`
}

CustomerResponseSchema customer response

func (*CustomerResponseSchema) Load

func (customer *CustomerResponseSchema) Load(model *db.Customer) error

Load ...

type Decoder

type Decoder interface {
	Decode(v interface{}) error
}

Decoder generic decoder

type Encoder

type Encoder interface {
	Encode(v interface{}) error
}

Encoder generic encoder

type LoginRequestSchema

type LoginRequestSchema struct {
	Email    string `json:"email,omitempty" yaml:"email,omitempty" validate:"required,email"`
	Password string `json:"password,omitempty" yaml:"password,omitempty" validate:"required,min=1,max=128"`
	Expiry   int    `json:"expiry,omitempty" yaml:"expiry,omitempty" validate:"omitempty,min=60,max=8640000"`
}

LoginRequestSchema ...

func LoginRequest

func LoginRequest() *LoginRequestSchema

LoginRequest ...

type PaginationRequestSchema

type PaginationRequestSchema struct {
	Limit int    `validate:"omitempty,min=1,max=100"`
	Start string `validate:"omitempty,min=1"`
}

PaginationRequestSchema ...

func PaginationRequest

func PaginationRequest() *PaginationRequestSchema

PaginationRequest ..

func (*PaginationRequestSchema) Load

func (req *PaginationRequestSchema) Load(r *http.Request) error

Load ...

func (*PaginationRequestSchema) String

func (req *PaginationRequestSchema) String() string

type PaginationResponseSchema

type PaginationResponseSchema struct {
	Limit int         `json:"limit" yaml:"limit"`
	Data  interface{} `json:"data" yaml:"data"`
	Last  string      `json:"last" yaml:"last"`
}

PaginationResponseSchema ...

func (*PaginationResponseSchema) SetLimit

func (page *PaginationResponseSchema) SetLimit(limit int)

SetLimit ...

func (*PaginationResponseSchema) String

func (page *PaginationResponseSchema) String() string

type Param

type Param struct {
	// contains filtered or unexported fields
}

Param ...

func NewParam

func NewParam(name string) *Param

NewParam ...

func (*Param) Bool

func (p *Param) Bool() (bool, error)

Bool ...

func (*Param) Exists

func (p *Param) Exists() bool

Exists ...

func (*Param) Float

func (p *Param) Float() (float64, error)

Float ...

func (*Param) Integer

func (p *Param) Integer() (int, error)

Integer ...

func (*Param) Load

func (p *Param) Load(request *http.Request) *Param

Load ...

func (*Param) Name

func (p *Param) Name() string

Name ...

func (*Param) String

func (p *Param) String() (string, error)

String ...

type PermissionEntry

type PermissionEntry struct {
	Publish   []string `yaml:"publish,omitempty" json:"publish,omitempty"`
	Subscribe []string `yaml:"subscribe,omitempty" json:"subscribe,omitempty"`
	Commands  []string `yaml:"commands,omitempty" json:"commands,omitempty"`
}

PermissionEntry permission for room

func NewPermission

func NewPermission(entry *db.RoomPermissionEntry) *PermissionEntry

NewPermission create new permission entry

type Plan

type Plan struct {
	Subscription int64 `json:"subscription,omitempty" yaml:"subscription,omitempty"`
	Bandwidth    int64 `json:"bandwidth,omitempty" yaml:"bandwidth,omitempty"`
	RoomSize     int64 `json:"room_size,omitempty" yaml:"room_size,omitempty"`
	RoomCount    int64 `json:"room_count,omitempty" yaml:"room_count,omitempty"`
	PeerCount    int64 `json:"peer_count,omitempty" yaml:"peer_count,omitempty"`
}

Plan customer Plan

type Request

type Request interface {
	Name() string
	Partial() bool
	RequestBuffer() interface{}
	WriteRequest(data interface{}) error
}

Request ...

type Response

type Response interface {
	Name() string
	ResponseBuffer() interface{}
	Code() int
	ReadResponse(data interface{}) error
}

Response ...

type RoomRecording

type RoomRecording struct {
	Enabled  bool          `yaml:"enabled,omitempty"  json:"enabled,omitempty"`
	Size     int64         `yaml:"size,omitempty" json:"size,omitempty"`
	Duration time.Duration `yaml:"duration,omitempty" json:"duration,omitempty"`
	Upload   *UploadInfo   `yaml:"upload,omitempty" json:"upload,omitempty"`
}

RoomRecording recording info

func NewRecording

func NewRecording(entry *db.RoomRecording) *RoomRecording

NewRecording ...

type RoomRequestSchema

type RoomRequestSchema struct {
	Name        *string                     `json:"name,omitempty" yaml:"name,omitempty" createValidate:"required" validate:"omitempty,min=1,max=512,alphanum"`
	Active      *bool                       `json:"active,omitempty" yaml:"active,omitempty"`
	Size        *int                        `json:"size,omitempty" yaml:"size,omitempty"`
	Description *string                     `json:"description,omitempty" yaml:"description,omitempty"  validate:"omitempty,min=1,max=1024"`
	User        string                      `json:"user,omitempty" yaml:"user,omitempty" validate:"required,mongoobjectid"`
	Roles       []string                    `json:"roles,omitempty" yaml:"roles,omitempty" validate:"omitempty,min=1,max=100,dive,min=1,max=128"`
	Waiting     *bool                       `json:"waiting,omitempty" yaml:"waiting,omitempty"`
	Locked      *bool                       `json:"locked,omitempty" yaml:"locked,omitempty"`
	Recording   *RoomRecording              `json:"recording,omitempty" yaml:"recording,omitempty"`
	Permissions map[string]*PermissionEntry `json:"permission,omitempty" yaml:"permission,omitempty"`
	Template    string                      `json:"template,omitempty" yaml:"template,omitempty"`
}

RoomRequestSchema room request

func (*RoomRequestSchema) Save

func (room *RoomRequestSchema) Save(update bool, model *db.Room) error

Save ...

func (*RoomRequestSchema) Validate

func (room *RoomRequestSchema) Validate(update bool, model *db.Room) error

Validate ...

type RoomResponseSchema

type RoomResponseSchema struct {
	ID          string                      `json:"id,omitempty" yaml:"id,omitempty"`
	Name        string                      `json:"name,omitempty" yaml:"name,omitempty"`
	Active      bool                        `json:"active,omitempty" yaml:"active,omitempty"`
	Size        int                         `json:"size,omitempty" yaml:"size,omitempty"`
	Locked      bool                        `json:"locked,omitempty" yaml:"locked,omitempty"`
	Waiting     bool                        `json:"waiting,omitempty" yaml:"waiting,omitempty"`
	Roles       []string                    `json:"roles,omitempty" yaml:"roles,omitempty"`
	Recording   *RoomRecording              `json:"recording,omitempty" yaml:"recording,omitempty"`
	Permissions map[string]*PermissionEntry `json:"permissions,omitempty" yaml:"permissions,omitempty"`
	Template    string                      `json:"template,omitempty" yaml:"template,omitempty"`
	Description string                      `json:"description,omitempty" yaml:"description,omitempty"`
	User        string                      `json:"user,omitempty" yaml:"user,omitempty"`
	Customer    string                      `json:"customer,omitempty" yaml:"customer,omitempty"`
	CreatedAt   time.Time                   `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	UpdatedAt   time.Time                   `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
}

RoomResponseSchema ...

func (*RoomResponseSchema) Load

func (room *RoomResponseSchema) Load(model *db.Room) error

Load ...

type Schema

type Schema interface {
	Name() string
	Request() Request
	Response() Response
	WithAuth(AuthProvider) Schema
	Paginate(limit int) error
}

Schema ...

func App

func App(model *db.App) Schema

App ...

func AppList

func AppList(list *db.AppList) Schema

AppList ...

func Auth

func Auth(model *db.Auth) Schema

Auth ...

func AuthList

func AuthList(list *db.AuthList) Schema

AuthList ...

func Counter

func Counter(model *db.Counter) Schema

Counter ...

func Customer

func Customer(model *db.Customer) Schema

Customer ...

func CustomerList

func CustomerList(list *db.CustomerList) Schema

CustomerList ...

func Error

func Error(err error) Schema

Error ..

func Login

func Login(req *LoginRequestSchema) Schema

Login ...

func Message

func Message(format string, v ...interface{}) Schema

Message ...

func Model

func Model(model db.Model) Schema

Model get schema for model

func ModelList

func ModelList(list db.ModelList) Schema

ModelList get schema for model list

func Room

func Room(model *db.Room) Schema

Room ...

func RoomList

func RoomList(list *db.RoomList) Schema

RoomList ...

func Session

func Session(model *db.Session) Schema

Session ...

func SessionList

func SessionList(list *db.SessionList) Schema

SessionList ...

func Token

func Token(req *TokenRequestSchema) Schema

Token ...

func User

func User(model *db.User) Schema

User ...

func UserList

func UserList(list *db.UserList) Schema

UserList ...

type SessionRecording

type SessionRecording struct {
	Location  string        `json:"location,omitempty" yaml:"location,omitempty"`
	Size      int64         `json:"size,omitempty" yaml:"size,omitempty"`
	Available bool          `json:"available,omitempty" yaml:"available,omitempty"`
	Duration  time.Duration `json:"closed,omitempty" yaml:"closed,omitempty"`
	CreatedAt time.Time     `json:"created_at,omitempty" yaml:"created_at,omitempty"`
}

SessionRecording ...

type SessionRequestSchema

type SessionRequestSchema struct {
	Room       *string             `json:"room,omitempty" yaml:"customer,omitempty" createValidate:"required,mongoobjectid"`
	Active     *bool               `json:"active,omitempty" yaml:"active,omitempty"`
	Peers      []string            `json:"peers,omitempty" yaml:"peers,omitempty"`
	Recordings []*SessionRecording `json:"recordings,omitempty" yaml:"recordings,omitempty"`
}

SessionRequestSchema session request

func (*SessionRequestSchema) Save

func (session *SessionRequestSchema) Save(update bool, model *db.Session) error

Save ...

func (*SessionRequestSchema) Validate

func (session *SessionRequestSchema) Validate(update bool, model *db.Session) error

Validate ...

type SessionResponseSchema

type SessionResponseSchema struct {
	ID         string              `json:"_id,omitempty" yaml:"_id,omitempty"`
	Room       string              `json:"room_id,omitempty" yaml:"room_id,omitempty"`
	Customer   string              `json:"customer_id,omitempty" yaml:"customer_id,omitempty"`
	User       string              `json:"user_id,omitempty" yaml:"user_id,omitempty"`
	Active     bool                `json:"active,omitempty" yaml:"active,omitempty"`
	Peers      []string            `json:"peers,omitempty" yaml:"peers,omitempty"`
	Recordings []*SessionRecording `json:"recordings,omitempty" yaml:"recordings,omitempty"`
	CreatedAt  time.Time           `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	UpdatedAt  time.Time           `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
}

SessionResponseSchema ...

func (*SessionResponseSchema) Load

func (session *SessionResponseSchema) Load(model *db.Session) error

Load ...

type TokenRequestSchema

type TokenRequestSchema struct {
	Duration  int
	Starts    int
	RoomID    string
	PeerID    string
	AccessKey string `validate:"required"`
	Role      string
}

TokenRequestSchema ...

func TokenRequest

func TokenRequest() *TokenRequestSchema

TokenRequest ...

func (*TokenRequestSchema) Load

func (schema *TokenRequestSchema) Load(auth AuthProvider) error

Load ...

type TokenResponseSchema

type TokenResponseSchema struct {
	Token  string    `json:"token,omitempty" yaml:"token,omitempty"`
	Expiry time.Time `json:"expiry,omitempty" yaml:"expiry,omitempty"`
}

TokenResponseSchema ...

func (*TokenResponseSchema) Load

func (schema *TokenResponseSchema) Load(authProvider AuthProvider, req *TokenRequestSchema) error

Load ...

type UploadInfo

type UploadInfo struct {
	Type        string            `json:"type,omitempty" yaml:"type,omitempty" validate:"required,eq=s3"`
	Location    string            `json:"location,omitempty" yaml:"location,omitempty" validate:"required,min=1,max=128"`
	Prefix      string            `json:"prefix,omitempty" yaml:"prefix,omitempty" validate:"omitempty,min=1,max=128"`
	Credentials *Credentials      `json:"credentials,omitempty" yaml:"credentials,omitempty"`
	Options     map[string]string `json:"options,omitempty" yaml:"options,omitempty"`
}

UploadInfo is Recording info of the room

type UserRequestSchema

type UserRequestSchema struct {
	Name     *string  `json:"name,omitempty" yaml:"name,omitempty"  validate:"omitempty,min=1,max=512,alpha"`
	Email    *string  `json:"email,omitempty" yaml:"email,omitempty" createValidate:"required,email"`
	Phone    *string  `json:"phone,omitempty" yaml:"phone,omitempty" validate:"omitempty,len=10,number"`
	Password *string  `json:"password,omitempty" yaml:"password,omitempty" createValidate:"required" validate:"min=6,max=128"`
	Active   *bool    `json:"active,omitempty" yaml:"active,omitempty"`
	Customer *bool    `json:"customer,omitempty" yaml:"customer,omitempty"`
	Roles    []string `json:"roles,omitempty" yaml:"roles,omitempty" validate:"omitempty,min=1,max=100,dive,min=1,max=128"`
}

UserRequestSchema user info

func (*UserRequestSchema) Save

func (user *UserRequestSchema) Save(update bool, model *db.User) error

Save ...

func (*UserRequestSchema) Validate

func (user *UserRequestSchema) Validate(update bool, model *db.User) error

Validate ...

type UserResponseSchema

type UserResponseSchema struct {
	ID        string    `json:"id,omitempty" yaml:"id,omitempty"`
	Name      string    `json:"name,omitempty" yaml:"name,omitempty"`
	Email     string    `json:"email,omitempty" yaml:"email,omitempty"`
	Phone     string    `json:"phone,omitempty" yaml:"phone,omitempty"`
	Active    bool      `json:"active,omitempty" yaml:"active,omitempty"`
	Locked    bool      `json:"locked,omitempty" yaml:"locked,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty" yaml:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty" yaml:"updated_at,omitempty"`
}

UserResponseSchema ...

func (*UserResponseSchema) Load

func (user *UserResponseSchema) Load(model *db.User) error

Load ...

type Webhook

type Webhook struct {
	URL     string            `json:"url,omitempty" yaml:"url,omitempty" validate:"required,url"`
	Headers map[string]string `json:"headers,omitempty" yaml:"headers,omitempty"`
}

Webhook ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL