ionscale

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthenticationInterceptor

func NewAuthenticationInterceptor(clientAuth ClientAuth) connect.UnaryInterceptorFunc

func NewClient

func NewClient(clientAuth ClientAuth, serverURL string, insecureSkipVerify bool) (api.IonscaleServiceClient, error)

func StoreAuthToken added in v0.13.0

func StoreAuthToken(addr, token string, tailnetID uint64) error

Types

type ACLAutoApprovers added in v0.15.0

type ACLAutoApprovers struct {
	Routes   map[string][]string `json:"routes,omitempty" hujson:"Routes,omitempty"`
	ExitNode []string            `json:"exitNode,omitempty" hujson:"ExitNode,omitempty"`
}

type ACLEntry added in v0.15.0

type ACLEntry struct {
	Action      string   `json:"action,omitempty" hujson:"Action,omitempty"`
	Protocol    string   `json:"proto,omitempty" hujson:"Proto,omitempty"`
	Source      []string `json:"src,omitempty" hujson:"Src,omitempty"`
	Destination []string `json:"dst,omitempty" hujson:"Dst,omitempty"`
}

type ACLGrant added in v0.15.0

type ACLGrant struct {
	Source      []string                 `json:"src,omitempty" hujson:"Src,omitempty"`
	Destination []string                 `json:"dst,omitempty" hujson:"Dst,omitempty"`
	IP          []tailcfg.ProtoPortRange `json:"ip,omitempty" hujson:"Ip,omitempty"`
	App         tailcfg.PeerCapMap       `json:"app,omitempty" hujson:"App,omitempty"`
}

type ACLNodeAttrGrant added in v0.15.0

type ACLNodeAttrGrant struct {
	Target []string `json:"target,omitempty" hujson:"Target,omitempty"`
	Attr   []string `json:"attr,omitempty" hujson:"Attr,omitempty"`
}

type ACLPolicy added in v0.15.0

type ACLPolicy struct {
	Groups        map[string][]string `json:"groups,omitempty" hujson:"Groups,omitempty"`
	Hosts         map[string]string   `json:"hosts,omitempty" hujson:"Hosts,omitempty"`
	ACLs          []ACLEntry          `json:"acls,omitempty" hujson:"ACLs,omitempty"`
	TagOwners     map[string][]string `json:"tagOwners,omitempty" hujson:"TagOwners,omitempty"`
	AutoApprovers *ACLAutoApprovers   `json:"autoApprovers,omitempty" hujson:"AutoApprovers,omitempty"`
	SSH           []ACLSSH            `json:"ssh,omitempty" hujson:"SSH,omitempty"`
	NodeAttrs     []ACLNodeAttrGrant  `json:"nodeAttrs,omitempty" hujson:"NodeAttrs,omitempty"`
	Grants        []ACLGrant          `json:"grants,omitempty" hujson:"Grants,omitempty"`
}

func (ACLPolicy) Marshal added in v0.15.0

func (a ACLPolicy) Marshal() string

type ACLSSH added in v0.15.0

type ACLSSH struct {
	Action      string   `json:"action,omitempty" hujson:"Action,omitempty"`
	Users       []string `json:"users,omitempty" hujson:"Users,omitempty"`
	Source      []string `json:"src,omitempty" hujson:"Src,omitempty"`
	Destination []string `json:"dst,omitempty" hujson:"Dst,omitempty"`
	CheckPeriod string   `json:"checkPeriod,omitempty" hujson:"CheckPeriod,omitempty"`
}

type Anonymous added in v0.13.0

type Anonymous struct {
}

func (Anonymous) GetToken added in v0.13.0

func (m Anonymous) GetToken() (string, error)

func (Anonymous) TailnetID added in v0.13.0

func (m Anonymous) TailnetID() uint64

type ClientAuth

type ClientAuth interface {
	GetToken() (string, error)
	TailnetID() uint64
}

func LoadClientAuth

func LoadClientAuth(addr string, systemAdminKey string) (ClientAuth, error)

type IAMPolicy added in v0.15.0

type IAMPolicy struct {
	Subs    []string          `json:"subs,omitempty" hujson:"Subs,omitempty"`
	Emails  []string          `json:"emails,omitempty" hujson:"Emails,omitempty"`
	Filters []string          `json:"filters,omitempty" hujson:"Filters,omitempty"`
	Roles   map[string]string `json:"roles,omitempty" hujson:"Roles,omitempty"`
}

func (IAMPolicy) Marshal added in v0.15.0

func (a IAMPolicy) Marshal() string

Jump to

Keyboard shortcuts

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