Documentation
¶
Overview ¶
Package ports displays Brev-managed public port mappings for an instance or Brev Connect machine.
Index ¶
- func Get(ctx context.Context, out io.Writer, portStore Store, portID string, ...) error
- func NewCmdClosePort(portStore Store) *cobra.Command
- func NewCmdCreatePort(portStore Store) *cobra.Command
- func NewCmdGetPort(portStore Store) *cobra.Command
- func NewCmdPorts(portStore Store) *cobra.Command
- func NewCmdPortsLs(portStore Store) *cobra.Command
- func NewCmdUpdatePort(portStore Store) *cobra.Command
- func Open(ctx context.Context, out io.Writer, portStore Store, nameOrID string, ...) error
- func OpenHTTP(ctx context.Context, out io.Writer, portStore Store, nameOrID string, ...) error
- func OpenSequential(ctx context.Context, out io.Writer, portStore Store, nameOrID string, ...) error
- func Run(ctx context.Context, out io.Writer, portStore Store, nameOrID string, ...) error
- type PortInfo
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶ added in v0.6.336
func Get( ctx context.Context, out io.Writer, portStore Store, portID string, jsonOutput bool, ) error
Get resolves a port by its exact ID and displays all of its data.
func NewCmdClosePort ¶
NewCmdClosePort creates the `brev ports remove` command.
func NewCmdCreatePort ¶
NewCmdCreatePort creates the `brev ports open` command.
func NewCmdGetPort ¶ added in v0.6.336
NewCmdGetPort creates the `brev ports get` command.
func NewCmdPorts ¶
NewCmdPorts creates the `brev ports` command group.
func NewCmdPortsLs ¶
NewCmdPortsLs creates the `brev ports ls` command.
func NewCmdUpdatePort ¶
NewCmdUpdatePort creates the `brev ports update` command.
func Open ¶
func Open( ctx context.Context, out io.Writer, portStore Store, nameOrID string, portNumber int32, protocol devplanev1.PortProtocol, allowedSources []string, jsonOutput bool, ) error
Open resolves a managed instance or Brev Connect machine and opens a port.
func OpenHTTP ¶
func OpenHTTP( ctx context.Context, out io.Writer, portStore Store, nameOrID string, portNumber int32, httpProtocol devplanev1.HttpPortProtocol, customHostname string, authorizedEmails []string, allowPublicUnauthenticated bool, jsonOutput bool, ) error
OpenHTTP resolves a managed instance or Brev Connect machine and creates an authenticated or public HTTP application endpoint.
func OpenSequential ¶ added in v0.6.336
func OpenSequential( ctx context.Context, out io.Writer, portStore Store, nameOrID string, fromPort int32, toPort int32, protocol devplanev1.PortProtocol, allowedSources []string, jsonOutput bool, ) error
OpenSequential resolves a managed instance or Brev Connect machine and opens an inclusive range whose public ports are allocated sequentially.
Types ¶
type PortInfo ¶
type PortInfo struct {
PortID string `json:"port_id"`
Endpoint string `json:"endpoint"`
PublicPort int32 `json:"public_port"`
DestinationPort int32 `json:"destination_port"`
Protocol string `json:"protocol"`
AllowedSources []string `json:"allowed_sources"`
AuthorizedEmails []string `json:"authorized_emails"`
AllowPublicUnauthenticated bool `json:"allow_public_unauthenticated"`
Type string `json:"type"`
}
PortInfo is the stable JSON representation of a port mapping.