domain

package
v2.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package domain provides core domain models for Moley.

Package domain provides core domain models for Moley.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Target TargetConfig `yaml:"target" json:"target" validate:"required"`
	Expose ExposeConfig `yaml:"expose" json:"expose" validate:"required"`
}

type ExposeConfig

type ExposeConfig struct {
	Subdomain string `yaml:"subdomain" json:"subdomain" validate:"required"`
}

type Ingress

type Ingress struct {
	Zone string      `yaml:"zone" json:"zone" validate:"required"`
	Apps []AppConfig `yaml:"apps" json:"apps" validate:"required,dive"`
}

type State

type State string

State represents the operational state of a resource.

const (
	StateUp   State = "up"
	StateDown State = "down"
)

type TargetConfig

type TargetConfig struct {
	Port     int            `yaml:"port" json:"port" validate:"required,min=1,max=65535"`
	Hostname string         `yaml:"hostname" json:"hostname" validate:"required"`
	Protocol TargetProtocol `yaml:"protocol" json:"protocol" validate:"required,oneof=http https tcp"`
}

func (*TargetConfig) GetTargetURL

func (t *TargetConfig) GetTargetURL() string

type TargetProtocol added in v2.2.3

type TargetProtocol string
const (
	ProtocolTCP   TargetProtocol = "tcp"
	ProtocolHTTP  TargetProtocol = "http"
	ProtocolHTTPS TargetProtocol = "https"
)

type Tunnel

type Tunnel struct {
	ID string `yaml:"id" json:"id" validate:"required"`
}

func NewTunnel

func NewTunnel(id string) (*Tunnel, error)

func (*Tunnel) GetName

func (t *Tunnel) GetName() string

Jump to

Keyboard shortcuts

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