Documentation
¶
Index ¶
- Variables
- func EnvironmentFromProfile(profile EnvironmentProfile) protocol.Environment
- func EnvironmentFromProfileWithEditableRoute(profile EnvironmentProfile) protocol.Environment
- func URLTargetAllowed(host string, policy URLTargetPolicy) bool
- func URLTargetIPAllowed(ip net.IP, policy URLTargetPolicy) bool
- type EnvironmentProfile
- type Store
- func (s *Store) Delete(ctx context.Context, req protocol.EnvProfileDeleteRequest) (protocol.EnvProfileDeleteResponse, error)
- func (s *Store) Get(ctx context.Context, gatewayEnvID string) (EnvironmentProfile, bool, error)
- func (s *Store) List(ctx context.Context) ([]EnvironmentProfile, error)
- func (s *Store) Upsert(ctx context.Context, req protocol.EnvProfileUpsertRequest) (protocol.Environment, error)
- type StoreOptions
- type URLTargetPolicy
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrGatewayEnvIDReserved = errors.New("gateway_env_id is reserved") ErrGatewayEnvIDInvalid = errors.New("gateway_env_id is invalid") ErrURLRequired = errors.New("url is required") ErrURLMustBeAbsoluteHTTP = errors.New("url must be an absolute http or https URL") ErrURLSchemeUnsupported = errors.New("url must use http or https") ErrURLCredentialsUnsupported = errors.New("url must not include embedded credentials") ErrURLTargetUnsafe = errors.New("url target is not allowed by the Gateway target policy") ErrSSHDestinationRequired = errors.New("ssh_destination is required") ErrSSHPortInvalid = errors.New("ssh_port must be between 1 and 65535") ErrContainerEngineInvalid = errors.New("container_engine must be docker or podman") ErrContainerIDRequired = errors.New("container_id is required") ErrContainerRuntimeRootRequired = errors.New("container_runtime_root is required") ErrSSHPasswordAuthUnsupported = errors.New("ssh password auth is not supported for gateway environment profiles yet") )
Functions ¶
func EnvironmentFromProfile ¶
func EnvironmentFromProfile(profile EnvironmentProfile) protocol.Environment
func EnvironmentFromProfileWithEditableRoute ¶
func EnvironmentFromProfileWithEditableRoute(profile EnvironmentProfile) protocol.Environment
func URLTargetAllowed ¶
func URLTargetAllowed(host string, policy URLTargetPolicy) bool
func URLTargetIPAllowed ¶
func URLTargetIPAllowed(ip net.IP, policy URLTargetPolicy) bool
Types ¶
type EnvironmentProfile ¶
type EnvironmentProfile struct {
GatewayEnvID string `json:"gateway_env_id"`
DisplayName string `json:"display_name"`
AccessRoute protocol.EnvProfileAccessRoute `json:"access_route"`
ControlOwner protocol.EnvProfileControlOwner `json:"control_owner"`
SSHPasswordSet bool `json:"ssh_password_set,omitempty"`
CreatedAtUnixMS int64 `json:"created_at_unix_ms"`
UpdatedAtUnixMS int64 `json:"updated_at_unix_ms"`
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewStoreWithOptions ¶
func NewStoreWithOptions(filePath string, options StoreOptions) *Store
func (*Store) Delete ¶
func (s *Store) Delete(ctx context.Context, req protocol.EnvProfileDeleteRequest) (protocol.EnvProfileDeleteResponse, error)
func (*Store) Upsert ¶
func (s *Store) Upsert(ctx context.Context, req protocol.EnvProfileUpsertRequest) (protocol.Environment, error)
type StoreOptions ¶
type StoreOptions struct {
URLTargetPolicy URLTargetPolicy
}
type URLTargetPolicy ¶
Click to show internal directories.
Click to hide internal directories.