model

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bonjour

type Bonjour struct {
	ID        uint `gorm:"primarykey"`
	CreatedAt time.Time

	Version  *densemver.DenSemVer `query:"v" valid:"required" gorm:"<-:create;type:integer;index"`
	Platform *Platform            `query:"p" gorm:"type:smallint;index"`
	UID      string               `query:"u" valid:"stringlength(32|32),alphanum" gorm:"type:char(32);index"`
	Legacy   uint8                `query:"l" gorm:"index"`

	Referer    string `query:"r" gorm:"-"`
	Reconnects int    `query:"i" gorm:"-"`
}

Bonjour is a bonjour request in which the client initiates request with basic params

type Platform

type Platform int

Platform describes the device user initiates request from

const (
	// PlatformWeb is the web platform
	PlatformWeb Platform = iota
	// PlatformAppIOS is the iOS App platform
	PlatformAppIOS
	// PlatformAppAndroid is the Android App platform
	PlatformAppAndroid
)

func (*Platform) Marshal

func (p *Platform) Marshal() string

func (*Platform) Scan

func (p *Platform) Scan(src interface{}) error

Scan implements sql.Scanner

func (*Platform) UnmarshalParam

func (p *Platform) UnmarshalParam(param string) error

UnmarshalParam implements echo.BindUnmarshaler

func (Platform) Value

func (p Platform) Value() (driver.Value, error)

Value implements driver.Valuer

Jump to

Keyboard shortcuts

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