vmanage

package
v0.0.0-...-ceada53 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL interface {
	List(ctx context.Context) ([]*acl.ACL, error)
	Delete(ctx context.Context, aclID string) error
	Create(ctx context.Context, data *acl.Input) (string, error)
	Get(ctx context.Context, aclID string) (*acl.ACL, error)
	GetByName(ctx context.Context, aclName string) (*acl.ACL, error)
	Update(ctx context.Context, aclID string, data *acl.Input) (*common.UpdateResponse, error)
}

type Client

type Client interface {
	Login(ctx context.Context, username, password string) error
	GetToken() string
	SetToken(token string)
	ACL() ACL
	Connection() Connection
	Device() Device
	Feature() Feature
	VPN() VPN
	VPC() VPC
	Status() Status
	Site() Site
	Policy() Policy
	URLFiltering() URLFiltering
	URLDenylist() URLDenylist
	URLAllowlist() URLAllowlist
}

type ClientImpl

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

func NewClient

func NewClient(
	url string,
	httpClient *http.Client,
	logger *logrus.Logger,
	longPollDuration time.Duration,
	longPollRetries int,
) (*ClientImpl, error)

func NewDefaultClient

func NewDefaultClient(url string) (*ClientImpl, error)

func NewDefaultInsecureClientWithJar

func NewDefaultInsecureClientWithJar(url string) (*ClientImpl, error)

func (*ClientImpl) ACL

func (c *ClientImpl) ACL() ACL

func (*ClientImpl) Connection

func (c *ClientImpl) Connection() Connection

func (*ClientImpl) Device

func (c *ClientImpl) Device() Device

func (*ClientImpl) Feature

func (c *ClientImpl) Feature() Feature

func (*ClientImpl) GetToken

func (c *ClientImpl) GetToken() string

func (*ClientImpl) Login

func (c *ClientImpl) Login(ctx context.Context, username, password string) error

func (*ClientImpl) Policy

func (c *ClientImpl) Policy() Policy

func (*ClientImpl) SetToken

func (c *ClientImpl) SetToken(token string)

func (*ClientImpl) Site

func (c *ClientImpl) Site() Site

func (*ClientImpl) Status

func (c *ClientImpl) Status() Status

func (*ClientImpl) URLAllowlist

func (c *ClientImpl) URLAllowlist() URLAllowlist

func (*ClientImpl) URLDenylist

func (c *ClientImpl) URLDenylist() URLDenylist

func (*ClientImpl) URLFiltering

func (c *ClientImpl) URLFiltering() URLFiltering

func (*ClientImpl) VPC

func (c *ClientImpl) VPC() VPC

func (*ClientImpl) VPN

func (c *ClientImpl) VPN() VPN

type Connection

type Connection interface {
	Create(ctx context.Context, parameters *connection.Parameters) (string, error)
	GetStatus(ctx context.Context, cloudType string) ([]*connection.Status, error)
}

type Device

type Device interface {
	Get(ctx context.Context, templateID string) (*device.Template, error)
	GetFromSite(ctx context.Context, siteID string) (*device.Template, error)
	GetByName(ctx context.Context, templateName string) (*device.Template, error)
	List(ctx context.Context) ([]*device.Template, error)
	Update(ctx context.Context, template *device.Template) (*device.UpdateResponse, error)
	GetAttachedDevices(ctx context.Context, templateID string) ([]*device.AttachedDevice, error)
	PushConfiguration(ctx context.Context, attachedDevices []*device.AttachedDevice, templateID string) (string, error)
}

type Feature

type Feature interface {
	Create(ctx context.Context, template *feature.TemplateInput) (string, error)
	ListByType(ctx context.Context, templateType string) ([]*feature.TemplateInput, error)
	List(ctx context.Context) ([]*feature.TemplateInput, error)
	Get(ctx context.Context, templateID string) (*feature.Template, error)
	Update(ctx context.Context, templateID string, template *feature.Template) (*common.UpdateResponse, error)
}

type Policy

type Policy interface {
	Get(ctx context.Context, policyID string) (*policy.Input, error)
	Delete(ctx context.Context, policyID string) error
	List(ctx context.Context) ([]*policy.Policy, error)
	Create(ctx context.Context, data *policy.Input) (string, error)
}

type Site

type Site interface {
	Get(ctx context.Context, siteID string) (*site.Site, error)
	List(ctx context.Context) ([]*site.Site, error)
}

type Status

type Status interface {
	ActionStatusLongPoll(ctx context.Context, id string) error
}

type URLAllowlist

type URLAllowlist interface {
	List(ctx context.Context) ([]*ual.URLAllowlistListResp, error)
	Get(ctx context.Context, id string) (*ual.URLAllowlist, error)
	GetByName(ctx context.Context, name string) (*ual.URLAllowlist, error)
	Create(ctx context.Context, urlDenylist *ual.URLAllowlistInput) (id string, err error)
	Delete(ctx context.Context, urlDenylistId string) error
	DeleteByName(ctx context.Context, urlDenylistName string) error
}

type URLDenylist

type URLDenylist interface {
	List(ctx context.Context) ([]*udl.URLDenylistListResp, error)
	Get(ctx context.Context, id string) (*udl.URLDenylist, error)
	GetByName(ctx context.Context, name string) (*udl.URLDenylist, error)
	Create(ctx context.Context, urlDenylist *udl.URLDenylistInput) (id string, err error)
	Delete(ctx context.Context, urlDenylistId string) error
	DeleteByName(ctx context.Context, urlDenylistName string) error
}

type URLFiltering

type URLFiltering interface {
	List(ctx context.Context) ([]*urlfiltering.URLFilteringListRespStructure, error)
	Get(ctx context.Context, id string) (*urlfiltering.URLFilteringDefinition, error)
	GetByName(ctx context.Context, name string) (*urlfiltering.URLFilteringDefinition, error)
	Create(ctx context.Context, urlFiltering *urlfiltering.URLFilteringDefinition) (definitionId string, err error)
	Delete(ctx context.Context, urlFilteringId string) error
	DeleteByName(ctx context.Context, urlFilteringName string) error
}

type VPC

type VPC interface {
	Get(ctx context.Context, cloudType, vpcID string) (*vpc.VPC, error)
	GetByName(ctx context.Context, cloudType, vpcName string) (*vpc.VPC, error)
	ListAll(ctx context.Context) ([]*vpc.VPC, error)
	List(ctx context.Context, cloudType string) ([]*vpc.VPC, error)
	ListWithParameters(ctx context.Context, parameters *vpc.ListVPCParameters) ([]*vpc.VPC, error)
	ListWithTag(ctx context.Context, cloudType, tag string) ([]*vpc.VPC, error)
	ListWithTagWithParameters(ctx context.Context, parameters *vpc.ListVPCTagParameters) ([]*vpc.VPC, error)
	CreateVPCTag(ctx context.Context, tagName string, vpc *vpc.VPC) (string, error)
	DeleteVPCTag(ctx context.Context, cloudType, tag string) (string, error)
}

type VPN

type VPN interface {
	List(ctx context.Context, cloudType string) ([]*vpn.Data, error)
}

Jump to

Keyboard shortcuts

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