google

package
v0.0.0-...-7c19135 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Config
	// contains filtered or unexported fields
}

Client is an azure peering client

func New

func New(conf Config) (*Client, error)

New will return a new google peering client

func (*Client) CreatePeering

func (c *Client) CreatePeering(ctx context.Context, req CreatePeeringRequest) error

CreatePeering will create a google peering between 2 project's networks

func (*Client) ListPeerings

func (c *Client) ListPeerings(ctx context.Context, req ListPeeringRequest) error

ListPeerings will list a google project's network peering

type Config

type Config struct {
	google_auth.AuthConfig
	Logger *logrus.Entry
}

Config is an google peering config

type CreatePeeringRequest

type CreatePeeringRequest struct {
	PeeringCommon
	RemoteNetworkName              string
	RemoteProjectName              string
	ExportCustomRoutes             bool
	ExportSubnetRoutesWithPublicIP bool
	ImportCustomRoutes             bool
	ImportSubnetRoutesWithPublicIP bool
}

CreatePeeringRequest is a request to create a peering between 2 google project's networks

type ListPeeringRequest

type ListPeeringRequest struct {
	PeeringCommon
	Region string
}

ListPeeringRequest is a request to list peerings for a specified project/network/peering name

type PeeringCommon

type PeeringCommon struct {
	ProjectID   string
	NetworkName string
	PeeringName string
}

PeeringCommon are the common fields between create/list peering requests

Jump to

Keyboard shortcuts

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