models

package
v0.0.0-...-2b29b9b Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 25 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB() error

func IsMoreThanOne

func IsMoreThanOne(err error) bool

func IsNotFound

func IsNotFound(err error) bool

Types

type SForward

type SForward struct {
	db.SVirtualResourceBase

	ProxyEndpointId string `width:"36" charset:"ascii" nullable:"false" list:"user" update:"user" create:"required"`
	ProxyAgentId    string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`

	Type        string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"`
	RemoteAddr  string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"`
	RemotePort  int    `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"`
	BindPortReq int    `width:"16" charset:"ascii" nullable:"false" list:"user" update:"user" create:"optional"`

	Opaque string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`

	BindPort        int       `width:"16" charset:"ascii" nullable:"false" list:"user" update:"user" create:"optional"`
	LastSeen        time.Time `nullable:"true" get:"user" list:"user"`
	LastSeenTimeout int       `width:"16" charset:"ascii" nullable:"false" list:"user" update:"user" create:"optional" default:"117"`
}

func (*SForward) GetDetailsLastseen

func (fwd *SForward) GetDetailsLastseen(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SForward) PerformHeartbeat

func (*SForward) ValidateUpdateData

func (fwd *SForward) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SForwardManager

type SForwardManager struct {
	db.SVirtualResourceBaseManager
}
var ForwardManager *SForwardManager

func (*SForwardManager) FetchCustomizeColumns

func (man *SForwardManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []*jsonutils.JSONDict

func (*SForwardManager) ListItemFilter

func (*SForwardManager) PerformCreateFromServer

func (*SForwardManager) ValidateCreateData

type SProxyAgent

type SProxyAgent struct {
	db.SStandaloneResourceBase

	BindAddr      string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"admin"`
	AdvertiseAddr string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"admin"`
}

bind_addr, default 0.0.0.0 advertise_addr, default default route adddr, maybe k8s cluster ip

func (*SProxyAgent) ValidateDeleteCondition

func (proxyagent *SProxyAgent) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

func (*SProxyAgent) ValidateUpdateData

func (proxyagent *SProxyAgent) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SProxyAgentManager

type SProxyAgentManager struct {
	db.SStandaloneResourceBaseManager
}
var ProxyAgentManager *SProxyAgentManager

func (*SProxyAgentManager) ValidateCreateData

type SProxyEndpoint

type SProxyEndpoint struct {
	db.SVirtualResourceBase

	User       string `nullable:"false" list:"user" update:"user" create:"optional"`
	Host       string `nullable:"false" list:"user" update:"user" create:"required"`
	Port       int    `nullable:"false" list:"user" update:"user" create:"optional"`
	PrivateKey string `nullable:"false" update:"user" list:"admin" get:"admin" create:"required"` // do not allow get, list

	IntranetIpAddr string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"required"`

	StatusDetail string `width:"128" charset:"ascii" nullable:"false" default:"init" list:"user" create:"optional" json:"status_detail"`
}

Add revision?

func (*SProxyEndpoint) CustomizeCreate

func (proxyendpoint *SProxyEndpoint) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SProxyEndpoint) CustomizeDelete

func (proxyendpoint *SProxyEndpoint) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SProxyEndpoint) PerformPurgeForwards

func (proxyendpoint *SProxyEndpoint) PerformPurgeForwards(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SProxyEndpoint) ValidateDeleteCondition

func (proxyendpoint *SProxyEndpoint) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

type SProxyEndpointManager

type SProxyEndpointManager struct {
	db.SVirtualResourceBaseManager
}
var ProxyEndpointManager *SProxyEndpointManager

func (*SProxyEndpointManager) ListItemFilter

func (*SProxyEndpointManager) ValidateCreateData

type SProxyMatch

type SProxyMatch struct {
	db.SVirtualResourceBase

	ProxyEndpointId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" update:"user"`
	MatchScope      string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required" update:"user"`
	MatchValue      string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" update:"user"`
}

func (*SProxyMatch) ValidateUpdateData

func (pm *SProxyMatch) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SProxyMatchManager

type SProxyMatchManager struct {
	db.SVirtualResourceBaseManager
}
var ProxyMatchManager *SProxyMatchManager

func (*SProxyMatchManager) ListItemFilter

func (*SProxyMatchManager) ValidateCreateData

type Subnets

type Subnets []*netutils.IPV4Prefix

func (Subnets) ContainsAny

func (nets Subnets) ContainsAny(nets1 Subnets) bool

func (Subnets) ContainsAnyEx

func (nets Subnets) ContainsAnyEx(nets1 Subnets) (bool, *netutils.IPV4Prefix)

func (Subnets) StrList

func (nets Subnets) StrList() []string

func (Subnets) String

func (nets Subnets) String() string

Jump to

Keyboard shortcuts

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