ovpn

package
v0.0.0-...-1167a52 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2018 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentProfileElement

type CommentProfileElement struct {
	Comment string
}

func (CommentProfileElement) ProfileElementType

func (CommentProfileElement) ProfileElementType() ProfileElementType

type DirectiveProfileElement

type DirectiveProfileElement interface {
	ProfileElement

	Directive() string
	Args() []string
}

type EmbeddedProfileElement

type EmbeddedProfileElement interface {
	ProfileElement

	Embed() string
	Data() string
}

type GenericDirectiveProfileElement

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

func (GenericDirectiveProfileElement) Args

func (GenericDirectiveProfileElement) Directive

func (e GenericDirectiveProfileElement) Directive() string

func (GenericDirectiveProfileElement) ProfileElementType

type GenericEmbeddedProfileElement

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

func (GenericEmbeddedProfileElement) Data

func (GenericEmbeddedProfileElement) Embed

func (GenericEmbeddedProfileElement) ProfileElementType

type Profile

type Profile struct {
	Name     string
	Elements []ProfileElement
}

func Parse

func Parse(profileBytes []byte) (*Profile, error)

func (Profile) GetDirective

func (p Profile) GetDirective(name string) []ProfileElement

func (Profile) GetEmbedded

func (p Profile) GetEmbedded(name string) []ProfileElement

type ProfileElement

type ProfileElement interface {
	ProfileElementType() ProfileElementType
}

func ParseDirective

func ParseDirective(raw []byte) (ProfileElement, error)

func ParseEmbedded

func ParseEmbedded(spec string, raw []byte) (ProfileElement, error)

type ProfileElementType

type ProfileElementType string
const (
	CommentProfileElementType   ProfileElementType = "comment"
	DirectiveProfileElementType ProfileElementType = "directive"
	EmbeddedProfileElementType  ProfileElementType = "embedded"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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