nsserver

package
v0.0.0-...-f12bbbc Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NSServer

type NSServer struct {
	ID                 uuid.UUID         `json:"id,omitempty" gorm:"type:uuid;primary_key;"`
	Name               string            `json:"name" gorm:"not null;default:null"`
	Region             string            `json:"region" gorm:"not null;default:null"`
	Pin                string            `json:"pin" gorm:"not null;default:null"`
	RequestedBy        string            `json:"requestedBy" gorm:"not null;default:null"`
	SSHPrivateKey      string            `json:"sshPrivateKey" gorm:"not null;default:null"`
	Insecure           bool              `json:"insecure" gorm:"not null;default:false"`
	BareMetal          bool              `json:"bareMetal" gorm:"not null;default:false"`
	MainIP             string            `json:"mainIP" gorm:""`
	GameUDPPort        int               `json:"gameUDPPort" gorm:"not null;default:0"`
	AuthTCPPort        int               `json:"authTCPPort" gorm:"not null;default:0"`
	MasterServer       string            `json:"masterServer" gorm:"not null;default:null"`
	ServerVersion      string            `json:"serverVersion" gorm:"not null;default:null"`
	ExtendLifetime     *time.Duration    `json:"extendLifetime" gorm:"default:null"`
	DockerImageVersion string            `json:"dockerImageVersion" gorm:"not null;default:null"`
	EnableCheats       bool              `json:"enableCheats" gorm:"not null;default:false"`
	ModOptions         datatypes.JSONMap `json:"options" gorm:""`
	TickRate           uint64            `json:"tick_rate" gorm:""`
	CreatedAt          time.Time
}

func (*NSServer) BeforeCreate

func (p *NSServer) BeforeCreate(tx *gorm.DB) (err error)

type Repo

type Repo interface {
	DeleteByID(ctx context.Context, id uuid.UUID) error
	DeleteByName(ctx context.Context, name string) error
	GetAll(ctx context.Context) ([]*NSServer, error)
	GetByID(ctx context.Context, id uuid.UUID) (*NSServer, error)
	GetByName(ctx context.Context, name string) (*NSServer, error)
	Store(ctx context.Context, u []*NSServer) error
	Update(ctx context.Context, u *NSServer) error
}

Jump to

Keyboard shortcuts

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