resource

package
v0.0.0-...-48d3ca6 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthTypePSK    = "psk"
	AuthTypePUBKEY = "pubkey"
)
View Source
const (
	SdewanApiVersion = "batch.sdewan.akraino.org/v1alpha1"
	SdewanPurpose    = "base"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Name           string
	ConnectionType string
	Mode           string
	LocalSubnet    string
	LocalSourceIp  string
	LocalUpDown    string
	LocalFirewall  string
	RemoteSubnet   string
	RemoteSourceIp string
	RemoteUpDown   string
	RemoteFirewall string
	CryptoProposal []string
	Mark           string
	IfId           string
}

type EmptyResource

type EmptyResource struct {
	Name string
	Type string
}

func (*EmptyResource) GetName

func (c *EmptyResource) GetName() string

func (*EmptyResource) GetType

func (c *EmptyResource) GetType() string

func (*EmptyResource) ToYaml

func (c *EmptyResource) ToYaml(target string) string

type FileResource

type FileResource struct {
	Name     string
	Type     string
	FileName string
}

func (*FileResource) GetName

func (c *FileResource) GetName() string

func (*FileResource) GetType

func (c *FileResource) GetType() string

func (*FileResource) ToYaml

func (c *FileResource) ToYaml(target string) string

type FirewallDnatResource

type FirewallDnatResource struct {
	Name            string
	Source          string
	SourceIP        string
	SourceDestIP    string
	SourceDestPort  string
	DestinationIP   string
	DestinationPort string
	Protocol        string
}

func (*FirewallDnatResource) GetName

func (c *FirewallDnatResource) GetName() string

func (*FirewallDnatResource) GetType

func (c *FirewallDnatResource) GetType() string

func (*FirewallDnatResource) ToYaml

func (c *FirewallDnatResource) ToYaml(target string) string

type FirewallNatResource

type FirewallNatResource struct {
	Name            string
	Source          string
	SourceIP        string
	SourcePort      string
	SourceDestIP    string
	SourceDestPort  string
	Dest            string
	DestinationIP   string
	DestinationPort string
	Protocol        string
	Target          string
	Index           string
}

func (*FirewallNatResource) GetName

func (c *FirewallNatResource) GetName() string

func (*FirewallNatResource) GetType

func (c *FirewallNatResource) GetType() string

func (*FirewallNatResource) ToYaml

func (c *FirewallNatResource) ToYaml(target string) string

type FirewallZoneResource

type FirewallZoneResource struct {
	Name    string
	Network []string
	Input   string
	Output  string
	Forward string
	MASQ    string
	MTU_FIX string
}

func (*FirewallZoneResource) GetName

func (c *FirewallZoneResource) GetName() string

func (*FirewallZoneResource) GetType

func (c *FirewallZoneResource) GetType() string

func (*FirewallZoneResource) ToYaml

func (c *FirewallZoneResource) ToYaml(target string) string

type HubSiteResource

type HubSiteResource struct {
	Name      string
	Type      string
	Site      string
	Subnet    string
	HubIP     string
	DevicePIP string
}

func (*HubSiteResource) GetName

func (c *HubSiteResource) GetName() string

func (*HubSiteResource) GetType

func (c *HubSiteResource) GetType() string

func (*HubSiteResource) ToYaml

func (c *HubSiteResource) ToYaml(target string) string

type ISdewanResource

type ISdewanResource interface {
	GetName() string
	GetType() string
	ToYaml(target string) string
}

type IpsecResource

type IpsecResource struct {
	Name                 string
	Type                 string
	Remote               string
	AuthenticationMethod string
	CryptoProposal       []string
	LocalIdentifier      string
	RemoteIdentifier     string
	ForceCryptoProposal  string
	PresharedKey         string
	PublicCert           string
	PrivateCert          string
	SharedCA             string
	Connections          Connection
}

func (*IpsecResource) GetName

func (c *IpsecResource) GetName() string

func (*IpsecResource) GetType

func (c *IpsecResource) GetType() string

func (*IpsecResource) ToYaml

func (c *IpsecResource) ToYaml(target string) string

type ProposalResource

type ProposalResource struct {
	Name       string
	Encryption string
	Hash       string
	DhGroup    string
}

func (*ProposalResource) GetName

func (c *ProposalResource) GetName() string

func (*ProposalResource) GetType

func (c *ProposalResource) GetType() string

func (*ProposalResource) ToYaml

func (c *ProposalResource) ToYaml(target string) string

type ResourceBuilder

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

func GetResourceBuilder

func GetResourceBuilder() *ResourceBuilder

func (*ResourceBuilder) Register

func (c *ResourceBuilder) Register(name string, r interface{})

func (*ResourceBuilder) ToObject

func (c *ResourceBuilder) ToObject(obj_str string) (ISdewanResource, error)

func (*ResourceBuilder) ToString

func (c *ResourceBuilder) ToString(obj ISdewanResource) (string, error)

type RouteResource

type RouteResource struct {
	Name        string
	Destination string
	Gateway     string
	Device      string
	Table       string
}

func (*RouteResource) GetName

func (c *RouteResource) GetName() string

func (*RouteResource) GetType

func (c *RouteResource) GetType() string

func (*RouteResource) ToYaml

func (c *RouteResource) ToYaml(target string) string

Jump to

Keyboard shortcuts

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