Documentation
¶
Index ¶
- Constants
- type Agent
- type DBTX
- type Dnsnameserver
- type Externalnetwork
- type Floatingip
- type GetAgentsRow
- type GetFloatingIPsRow
- type GetHARouterAgentPortBindingsWithAgentsRow
- type GetNetworkIPAvailabilitiesTotalRow
- type GetNetworkIPAvailabilitiesUsedRow
- type GetNetworksRow
- type GetPortsRow
- type GetQuotasRow
- type GetResourceCountsByProjectRow
- type GetRoutersRow
- type GetSubnetPoolsRow
- type GetSubnetsRow
- type HaRouterAgentPortBinding
- type HaRouterAgentPortBindingsState
- type Ipallocation
- type Ipallocationpool
- type Ml2PortBinding
- type Network
- type Networkrbac
- type Networksegment
- type NullHaRouterAgentPortBindingsState
- type NullSecuritygrouprulesDirection
- type NullSubnetsIpv6AddressMode
- type NullSubnetsIpv6RaMode
- type Port
- type Queries
- func (q *Queries) GetAgents(ctx context.Context) ([]GetAgentsRow, error)
- func (q *Queries) GetFloatingIPs(ctx context.Context) ([]GetFloatingIPsRow, error)
- func (q *Queries) GetHARouterAgentPortBindingsWithAgents(ctx context.Context) ([]GetHARouterAgentPortBindingsWithAgentsRow, error)
- func (q *Queries) GetNetworkIPAvailabilitiesTotal(ctx context.Context) ([]GetNetworkIPAvailabilitiesTotalRow, error)
- func (q *Queries) GetNetworkIPAvailabilitiesUsed(ctx context.Context) ([]GetNetworkIPAvailabilitiesUsedRow, error)
- func (q *Queries) GetNetworks(ctx context.Context) ([]GetNetworksRow, error)
- func (q *Queries) GetPorts(ctx context.Context) ([]GetPortsRow, error)
- func (q *Queries) GetQuotas(ctx context.Context) ([]GetQuotasRow, error)
- func (q *Queries) GetResourceCountsByProject(ctx context.Context) ([]GetResourceCountsByProjectRow, error)
- func (q *Queries) GetRouters(ctx context.Context) ([]GetRoutersRow, error)
- func (q *Queries) GetSecurityGroupCount(ctx context.Context) (int64, error)
- func (q *Queries) GetSubnetPools(ctx context.Context) ([]GetSubnetPoolsRow, error)
- func (q *Queries) GetSubnets(ctx context.Context) ([]GetSubnetsRow, error)
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type Quota
- type Router
- type Securitygroup
- type Securitygrouprule
- type SecuritygrouprulesDirection
- type Standardattribute
- type Subnet
- type Subnetpool
- type Subnetpoolprefix
- type SubnetsIpv6AddressMode
- type SubnetsIpv6RaMode
- type Tag
Constants ¶
View Source
const GetAgents = `-- name: GetAgents :many
SELECT
a.id,
a.agent_type,
a.` + "`" + `binary` + "`" + ` as service,
a.host as hostname,
CASE
WHEN a.admin_state_up = 1 THEN 'enabled'
ELSE 'disabled'
END as admin_state,
a.availability_zone as zone,
CASE
WHEN TIMESTAMPDIFF(SECOND, a.heartbeat_timestamp, NOW()) <= 75 THEN 1
ELSE 0
END as alive
FROM
agents a
`
View Source
const GetFloatingIPs = `` /* 212-byte string literal not displayed */
View Source
const GetHARouterAgentPortBindingsWithAgents = `` /* 330-byte string literal not displayed */
View Source
const GetNetworkIPAvailabilitiesTotal = `` /* 489-byte string literal not displayed */
View Source
const GetNetworkIPAvailabilitiesUsed = `` /* 404-byte string literal not displayed */
View Source
const GetNetworks = `` /* 1238-byte string literal not displayed */
View Source
const GetPorts = `` /* 558-byte string literal not displayed */
View Source
const GetQuotas = `-- name: GetQuotas :many
SELECT
q.project_id,
q.resource,
q.` + "`" + `limit` + "`" + `
FROM
quotas q
WHERE
q.project_id IS NOT NULL
`
View Source
const GetResourceCountsByProject = `` /* 1508-byte string literal not displayed */
View Source
const GetRouters = `` /* 227-byte string literal not displayed */
View Source
const GetSecurityGroupCount = `-- name: GetSecurityGroupCount :one
SELECT
CAST(COUNT(*) AS SIGNED) as cnt
FROM
securitygroups
`
View Source
const GetSubnetPools = `` /* 434-byte string literal not displayed */
View Source
const GetSubnets = `` /* 640-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
ID string
AgentType string
Binary string
Topic string
Host string
AdminStateUp bool
CreatedAt time.Time
StartedAt time.Time
HeartbeatTimestamp time.Time
Description sql.NullString
Configurations string
Load int32
AvailabilityZone sql.NullString
ResourceVersions sql.NullString
ResourcesSynced sql.NullBool
}
type Dnsnameserver ¶
type Externalnetwork ¶
type Floatingip ¶
type Floatingip struct {
ProjectID sql.NullString
ID string
FloatingIpAddress string
FloatingNetworkID string
FloatingPortID string
FixedPortID sql.NullString
FixedIpAddress sql.NullString
RouterID sql.NullString
LastKnownRouterID sql.NullString
Status sql.NullString
StandardAttrID int64
}
type GetAgentsRow ¶
type GetFloatingIPsRow ¶
type GetFloatingIPsRow struct {
ID string
FloatingIpAddress string
FloatingNetworkID string
ProjectID sql.NullString
RouterID sql.NullString
Status sql.NullString
FixedIpAddress sql.NullString
}
type GetHARouterAgentPortBindingsWithAgentsRow ¶
type GetHARouterAgentPortBindingsWithAgentsRow struct {
RouterID string
L3AgentID sql.NullString
State NullHaRouterAgentPortBindingsState
AgentHost sql.NullString
AgentAdminStateUp sql.NullBool
AgentHeartbeatTimestamp sql.NullTime
}
type GetNetworkIPAvailabilitiesTotalRow ¶
type GetNetworkIPAvailabilitiesTotalRow struct {
SubnetName sql.NullString
NetworkName sql.NullString
SubnetID string
NetworkID string
FirstIp sql.NullString
LastIp sql.NullString
ProjectID sql.NullString
Cidr string
IpVersion int32
}
type GetNetworkIPAvailabilitiesUsedRow ¶
type GetNetworkIPAvailabilitiesUsedRow struct {
SubnetID string
SubnetName sql.NullString
Cidr string
IpVersion int32
ProjectID sql.NullString
NetworkID sql.NullString
NetworkName sql.NullString
AllocationCount int64
}
type GetNetworksRow ¶
type GetNetworksRow struct {
ID string
Name sql.NullString
ProjectID sql.NullString
Status sql.NullString
ProviderNetworkType sql.NullString
ProviderPhysicalNetwork sql.NullString
ProviderSegmentationID interface{}
Subnets interface{}
IsExternal int32
Tags interface{}
}
type GetPortsRow ¶
type GetPortsRow struct {
ID string
MacAddress string
DeviceOwner string
Status string
NetworkID string
AdminStateUp bool
IpAllocation sql.NullString
BindingVifType sql.NullString
FixedIps interface{}
}
type GetQuotasRow ¶
type GetQuotasRow struct {
ProjectID sql.NullString
Resource sql.NullString
Limit sql.NullInt32
}
type GetResourceCountsByProjectRow ¶
type GetResourceCountsByProjectRow struct {
ProjectID sql.NullString
Resource string
Cnt int64
}
type GetRoutersRow ¶
type GetRoutersRow struct {
ID string
Name sql.NullString
Status sql.NullString
AdminStateUp sql.NullBool
ProjectID sql.NullString
ExternalNetworkID string
}
type GetSubnetPoolsRow ¶
type GetSubnetPoolsRow struct {
ID string
IpVersion int32
MaxPrefixlen int32
MinPrefixlen int32
DefaultPrefixlen int32
ProjectID sql.NullString
Name sql.NullString
Prefixes interface{}
}
type GetSubnetsRow ¶
type GetSubnetsRow struct {
ID string
Name sql.NullString
Cidr string
GatewayIp sql.NullString
NetworkID string
ProjectID sql.NullString
EnableDhcp sql.NullBool
DnsNameservers interface{}
SubnetpoolID sql.NullString
Tags interface{}
}
type HaRouterAgentPortBinding ¶
type HaRouterAgentPortBinding struct {
PortID string
RouterID string
L3AgentID sql.NullString
State NullHaRouterAgentPortBindingsState
}
type HaRouterAgentPortBindingsState ¶
type HaRouterAgentPortBindingsState string
const ( HaRouterAgentPortBindingsStateActive HaRouterAgentPortBindingsState = "active" HaRouterAgentPortBindingsStateStandby HaRouterAgentPortBindingsState = "standby" HaRouterAgentPortBindingsStateUnknown HaRouterAgentPortBindingsState = "unknown" )
func (*HaRouterAgentPortBindingsState) Scan ¶
func (e *HaRouterAgentPortBindingsState) Scan(src interface{}) error
type Ipallocation ¶
type Ipallocation struct {
PortID sql.NullString
IpAddress string
SubnetID string
NetworkID string
}
type Ipallocationpool ¶
type Ipallocationpool struct {
ID string
SubnetID sql.NullString
FirstIp string
LastIp string
}
type Ml2PortBinding ¶
type Network ¶
type Network struct {
ProjectID sql.NullString
ID string
Name sql.NullString
Status sql.NullString
AdminStateUp sql.NullBool
VlanTransparent sql.NullBool
StandardAttrID int64
AvailabilityZoneHints sql.NullString
Mtu int32
}
type Networkrbac ¶
type Networksegment ¶
type NullHaRouterAgentPortBindingsState ¶
type NullHaRouterAgentPortBindingsState struct {
HaRouterAgentPortBindingsState HaRouterAgentPortBindingsState
Valid bool // Valid is true if HaRouterAgentPortBindingsState is not NULL
}
func (*NullHaRouterAgentPortBindingsState) Scan ¶
func (ns *NullHaRouterAgentPortBindingsState) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullSecuritygrouprulesDirection ¶
type NullSecuritygrouprulesDirection struct {
SecuritygrouprulesDirection SecuritygrouprulesDirection
Valid bool // Valid is true if SecuritygrouprulesDirection is not NULL
}
func (*NullSecuritygrouprulesDirection) Scan ¶
func (ns *NullSecuritygrouprulesDirection) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullSubnetsIpv6AddressMode ¶
type NullSubnetsIpv6AddressMode struct {
SubnetsIpv6AddressMode SubnetsIpv6AddressMode
Valid bool // Valid is true if SubnetsIpv6AddressMode is not NULL
}
func (*NullSubnetsIpv6AddressMode) Scan ¶
func (ns *NullSubnetsIpv6AddressMode) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullSubnetsIpv6RaMode ¶
type NullSubnetsIpv6RaMode struct {
SubnetsIpv6RaMode SubnetsIpv6RaMode
Valid bool // Valid is true if SubnetsIpv6RaMode is not NULL
}
func (*NullSubnetsIpv6RaMode) Scan ¶
func (ns *NullSubnetsIpv6RaMode) Scan(value interface{}) error
Scan implements the Scanner interface.
type Port ¶
type Port struct {
ProjectID sql.NullString
ID string
Name sql.NullString
NetworkID string
MacAddress string
AdminStateUp bool
Status string
DeviceID string
DeviceOwner string
StandardAttrID int64
IpAllocation sql.NullString
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) GetAgents ¶
func (q *Queries) GetAgents(ctx context.Context) ([]GetAgentsRow, error)
func (*Queries) GetFloatingIPs ¶
func (q *Queries) GetFloatingIPs(ctx context.Context) ([]GetFloatingIPsRow, error)
func (*Queries) GetHARouterAgentPortBindingsWithAgents ¶
func (q *Queries) GetHARouterAgentPortBindingsWithAgents(ctx context.Context) ([]GetHARouterAgentPortBindingsWithAgentsRow, error)
func (*Queries) GetNetworkIPAvailabilitiesTotal ¶
func (q *Queries) GetNetworkIPAvailabilitiesTotal(ctx context.Context) ([]GetNetworkIPAvailabilitiesTotalRow, error)
func (*Queries) GetNetworkIPAvailabilitiesUsed ¶
func (q *Queries) GetNetworkIPAvailabilitiesUsed(ctx context.Context) ([]GetNetworkIPAvailabilitiesUsedRow, error)
func (*Queries) GetNetworks ¶
func (q *Queries) GetNetworks(ctx context.Context) ([]GetNetworksRow, error)
func (*Queries) GetQuotas ¶
func (q *Queries) GetQuotas(ctx context.Context) ([]GetQuotasRow, error)
func (*Queries) GetResourceCountsByProject ¶
func (q *Queries) GetResourceCountsByProject(ctx context.Context) ([]GetResourceCountsByProjectRow, error)
func (*Queries) GetRouters ¶
func (q *Queries) GetRouters(ctx context.Context) ([]GetRoutersRow, error)
func (*Queries) GetSecurityGroupCount ¶
func (*Queries) GetSubnetPools ¶
func (q *Queries) GetSubnetPools(ctx context.Context) ([]GetSubnetPoolsRow, error)
func (*Queries) GetSubnets ¶
func (q *Queries) GetSubnets(ctx context.Context) ([]GetSubnetsRow, error)
type Quota ¶
type Quota struct {
ID string
ProjectID sql.NullString
Resource sql.NullString
Limit sql.NullInt32
}
type Router ¶
type Router struct {
ProjectID sql.NullString
ID string
Name sql.NullString
Status sql.NullString
AdminStateUp sql.NullBool
GwPortID sql.NullString
EnableSnat bool
StandardAttrID int64
FlavorID sql.NullString
}
type Securitygroup ¶
type Securitygroup struct {
ProjectID sql.NullString
ID string
Name sql.NullString
StandardAttrID int64
Stateful bool
}
type Securitygrouprule ¶
type Securitygrouprule struct {
ProjectID sql.NullString
ID string
SecurityGroupID string
RemoteGroupID sql.NullString
Direction NullSecuritygrouprulesDirection
Ethertype sql.NullString
Protocol sql.NullString
PortRangeMin sql.NullInt32
PortRangeMax sql.NullInt32
RemoteIpPrefix sql.NullString
StandardAttrID int64
RemoteAddressGroupID sql.NullString
NormalizedCidr sql.NullString
}
type SecuritygrouprulesDirection ¶
type SecuritygrouprulesDirection string
const ( SecuritygrouprulesDirectionIngress SecuritygrouprulesDirection = "ingress" SecuritygrouprulesDirectionEgress SecuritygrouprulesDirection = "egress" )
func (*SecuritygrouprulesDirection) Scan ¶
func (e *SecuritygrouprulesDirection) Scan(src interface{}) error
type Standardattribute ¶
type Subnet ¶
type Subnet struct {
ProjectID sql.NullString
ID string
Name sql.NullString
NetworkID string
IpVersion int32
Cidr string
GatewayIp sql.NullString
EnableDhcp sql.NullBool
Ipv6RaMode NullSubnetsIpv6RaMode
Ipv6AddressMode NullSubnetsIpv6AddressMode
SubnetpoolID sql.NullString
StandardAttrID int64
SegmentID sql.NullString
}
type Subnetpool ¶
type Subnetpoolprefix ¶
type SubnetsIpv6AddressMode ¶
type SubnetsIpv6AddressMode string
const ( SubnetsIpv6AddressModeSlaac SubnetsIpv6AddressMode = "slaac" SubnetsIpv6AddressModeDhcpv6Stateful SubnetsIpv6AddressMode = "dhcpv6-stateful" SubnetsIpv6AddressModeDhcpv6Stateless SubnetsIpv6AddressMode = "dhcpv6-stateless" )
func (*SubnetsIpv6AddressMode) Scan ¶
func (e *SubnetsIpv6AddressMode) Scan(src interface{}) error
type SubnetsIpv6RaMode ¶
type SubnetsIpv6RaMode string
const ( SubnetsIpv6RaModeSlaac SubnetsIpv6RaMode = "slaac" SubnetsIpv6RaModeDhcpv6Stateful SubnetsIpv6RaMode = "dhcpv6-stateful" SubnetsIpv6RaModeDhcpv6Stateless SubnetsIpv6RaMode = "dhcpv6-stateless" )
func (*SubnetsIpv6RaMode) Scan ¶
func (e *SubnetsIpv6RaMode) Scan(src interface{}) error
Click to show internal directories.
Click to hide internal directories.