apimodels

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthLogin

type AuthLogin struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type CreateMesh

type CreateMesh struct {
	Name string   `json:"name" binding:"required"`
	IPs  []string `json:"ips" binding:"required"`
}

func (*CreateMesh) IsValidHostname

func (r *CreateMesh) IsValidHostname() (bool, string)

type CreateTunnel

type CreateTunnel struct {
	Hostname string `json:"hostname" binding:"required"`
	Password string `json:"password" binding:"required"`
}

func (*CreateTunnel) IsValidHostname

func (r *CreateTunnel) IsValidHostname() (bool, string)

type TunnelWithPass

type TunnelWithPass struct {
	ID        uint      `json:"id"`
	Hostname  string    `json:"hostname"`
	IP        string    `json:"ip"`
	Password  string    `json:"password"`
	Active    bool      `json:"active"`
	CreatedAt time.Time `json:"created_at"`
}

type UserPatch

type UserPatch struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type UserRegistration

type UserRegistration struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

func (*UserRegistration) IsValidUsername

func (r *UserRegistration) IsValidUsername() (bool, string)

Jump to

Keyboard shortcuts

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