Versions in this module Expand all Collapse all v0 v0.1.0 Feb 22, 2023 Changes in this version + func Migrate() error + type AddPortForwardParams struct + ID string + InternalHost string + InternalPort int64 + PublicIp string + PublicPort int64 + type AddPublicIPParams struct + ID string + Ip string + Router string + Subnet string + type AddRouterParams struct + ID string + Instance string + TrunkNic string + type CreateHostParams struct + ID string + Instance string + Ipv4 string + Mac string + Network string + Tenant string + Trunk bool + UserData []byte + type CreateNetworkParams struct + ID string + Router string + Subnet string + Tenant string + type CreatePublicSubnetParams struct + ID string + Subnet string + type CreateSystemNetworkParams struct + ID string + Router string + Subnet string + Tenant string + type DBTX interface + ExecContext func(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext func(context.Context, string) (*sql.Stmt, error) + QueryContext func(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext func(context.Context, string, ...interface{}) *sql.Row + type Host struct + ID string + Instance string + Ipv4 string + Mac string + Network string + Tenant string + Trunk bool + UserData []byte + func (h Host) GetProto() *protos.Host + type Network struct + ID string + Router string + Subnet string + Tenant string + Vlan int64 + func (n Network) GetProto() *protos.Network + type PortForward struct + ID string + InternalHost string + InternalPort int64 + PublicIp string + PublicPort int64 + func (p PortForward) GetOpenAPI() openapi.PortForward + func (p PortForward) GetProto(ctx context.Context, queries *Queries) (*protos.PortForward, error) + type PublicIp struct + ID string + Ip string + Router string + Subnet string + func (i PublicIp) GetOpenAPI() openapi.PublicIP + func (i PublicIp) GetProto(ctx context.Context, queries *Queries) (*protos.PublicIP, error) + type PublicSubnet struct + ID string + Subnet string + func (s PublicSubnet) GetOpenAPI() openapi.PublicSubnet + type Queries struct + func Get() (*Queries, *sql.DB, error) + func New(db DBTX) *Queries + func (q *Queries) AddPortForward(ctx context.Context, arg AddPortForwardParams) (PortForward, error) + func (q *Queries) AddPublicIP(ctx context.Context, arg AddPublicIPParams) (PublicIp, error) + func (q *Queries) AddRouter(ctx context.Context, arg AddRouterParams) (Router, error) + func (q *Queries) CreateHost(ctx context.Context, arg CreateHostParams) (Host, error) + func (q *Queries) CreateNetwork(ctx context.Context, arg CreateNetworkParams) (Network, error) + func (q *Queries) CreatePublicSubnet(ctx context.Context, arg CreatePublicSubnetParams) (PublicSubnet, error) + func (q *Queries) CreateSystemNetwork(ctx context.Context, arg CreateSystemNetworkParams) (Network, error) + func (q *Queries) DeletePortForward(ctx context.Context, id string) error + func (q *Queries) GetAllRouters(ctx context.Context) ([]Router, error) + func (q *Queries) GetHost(ctx context.Context, id string) (Host, error) + func (q *Queries) GetHostByMac(ctx context.Context, mac string) (Host, error) + func (q *Queries) GetHostsByNetwork(ctx context.Context, network string) ([]Host, error) + func (q *Queries) GetNetwork(ctx context.Context, id string) (Network, error) + func (q *Queries) GetNetworks(ctx context.Context, tenant string) ([]Network, error) + func (q *Queries) GetNetworksByRouter(ctx context.Context, router string) ([]Network, error) + func (q *Queries) GetPortForwards(ctx context.Context) ([]PortForward, error) + func (q *Queries) GetPortForwardsByIP(ctx context.Context, publicIp string) ([]PortForward, error) + func (q *Queries) GetPortForwardsByInternalHost(ctx context.Context, internalHost string) ([]PortForward, error) + func (q *Queries) GetPortForwardsByRouter(ctx context.Context, router string) ([]PortForward, error) + func (q *Queries) GetPublicIPByIP(ctx context.Context, ip string) (PublicIp, error) + func (q *Queries) GetPublicIPsByRouter(ctx context.Context, router string) ([]PublicIp, error) + func (q *Queries) GetPublicIPsBySubnet(ctx context.Context, subnet string) ([]PublicIp, error) + func (q *Queries) GetPublicSubnet(ctx context.Context, id string) (PublicSubnet, error) + func (q *Queries) GetPublicSubnets(ctx context.Context) ([]PublicSubnet, error) + func (q *Queries) GetRouter(ctx context.Context, instance string) (Router, error) + func (q *Queries) GetRouterForPortForward(ctx context.Context, id string) (string, error) + func (q *Queries) WithTx(tx *sql.Tx) *Queries + type Router struct + ID string + Instance string + TrunkNic string + func (r Router) GetOpenAPI() openapi.Router