Documentation ¶
Index ¶
- Variables
- type AppOperations
- type CloudProviderOperations
- type FakeAppOperations
- type FakeCloudProviderOperations
- type FakeK8sOperations
- func (f *FakeK8sOperations) HasIngress(namespace, name string) (bool, error)
- func (f *FakeK8sOperations) IsInvalid(err error) bool
- func (f *FakeK8sOperations) IsNotFound(err error) bool
- func (f *FakeK8sOperations) Service(namespace, svcName string) (*spec.Service, error)
- func (f *FakeK8sOperations) SetLoadBalancerSourceRanges(namespace, svcName string, sourceRanges []string) error
- func (f *FakeK8sOperations) UpdateServicePorts(namespace, svcName string, ports []spec.ServicePort) error
- type FakeOperations
- func (f *FakeOperations) EnableSSL(user *database.User, appName, cert string, only bool) error
- func (f *FakeOperations) Info(user *database.User, appName string) (*Info, error)
- func (f *FakeOperations) SetStaticIp(user *database.User, appName, addressName string) error
- func (f *FakeOperations) WhitelistSourceRanges(user *database.User, appName string, sourceRanges []string) error
- type Info
- type K8sOperations
- type Operations
- type SSLInfo
- type Service
- func (svc *Service) EnableSSL(ctx context.Context, req *svcpb.EnableSSLRequest) (*svcpb.Empty, error)
- func (svc *Service) Info(ctx context.Context, req *svcpb.InfoRequest) (*svcpb.InfoResponse, error)
- func (svc *Service) RegisterService(grpcServer *grpc.Server)
- func (svc *Service) SetStaticIp(ctx context.Context, req *svcpb.SetStaticIpRequest) (*svcpb.Empty, error)
- func (svc *Service) WhitelistSourceRanges(ctx context.Context, req *svcpb.WhitelistSourceRangesRequest) (*svcpb.Empty, error)
- type ServiceOperations
- func (ops *ServiceOperations) EnableSSL(user *database.User, appName, cert string, only bool) error
- func (ops *ServiceOperations) Info(user *database.User, appName string) (*Info, error)
- func (ops *ServiceOperations) SetStaticIp(user *database.User, appName, addressName string) error
- func (ops *ServiceOperations) WhitelistSourceRanges(user *database.User, appName string, sourceRanges []string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = status.Errorf(codes.NotFound, "Service not found") ErrInvalidSourceRanges = status.Errorf(codes.InvalidArgument, "Invalid source ranges") ErrWhitelistUnimplemented = status.Errorf(codes.Unimplemented, "Whitelist not supported for ingress or internal apps") )
Functions ¶
This section is empty.
Types ¶
type AppOperations ¶
type CloudProviderOperations ¶
type FakeAppOperations ¶
func (*FakeAppOperations) CheckPermAndGet ¶ added in v0.20.0
func (*FakeAppOperations) HasPermission ¶
func (f *FakeAppOperations) HasPermission(user *database.User, appName string) bool
type FakeCloudProviderOperations ¶
type FakeCloudProviderOperations struct { CreateOrUpdateSSLErr error CreateOrUpdateStaticIpErr error SSLInfoErr error SSLInfoValue *SSLInfo }
func (*FakeCloudProviderOperations) CreateOrUpdateSSL ¶
func (f *FakeCloudProviderOperations) CreateOrUpdateSSL(appName, cert string, port int) error
func (*FakeCloudProviderOperations) CreateOrUpdateStaticIp ¶ added in v0.30.0
func (f *FakeCloudProviderOperations) CreateOrUpdateStaticIp(appName, addressName string) error
type FakeK8sOperations ¶
type FakeK8sOperations struct { UpdateServicePortsErr error IsNotFoundErr bool ServiceErr error ServiceValue *spec.Service SetLoadBalancerSourceRangesErr error IsInvalidErr bool HasIngressValue bool HasIngressErr error }
func (*FakeK8sOperations) HasIngress ¶ added in v0.26.0
func (f *FakeK8sOperations) HasIngress(namespace, name string) (bool, error)
func (*FakeK8sOperations) IsInvalid ¶ added in v0.24.0
func (f *FakeK8sOperations) IsInvalid(err error) bool
func (*FakeK8sOperations) IsNotFound ¶
func (f *FakeK8sOperations) IsNotFound(err error) bool
func (*FakeK8sOperations) Service ¶ added in v0.24.0
func (f *FakeK8sOperations) Service(namespace, svcName string) (*spec.Service, error)
func (*FakeK8sOperations) SetLoadBalancerSourceRanges ¶ added in v0.24.0
func (f *FakeK8sOperations) SetLoadBalancerSourceRanges(namespace, svcName string, sourceRanges []string) error
func (*FakeK8sOperations) UpdateServicePorts ¶
func (f *FakeK8sOperations) UpdateServicePorts(namespace, svcName string, ports []spec.ServicePort) error
type FakeOperations ¶
type FakeOperations struct { EnableSSLErr error SetStaticIpErr error InfoErr error InfoValue *Info WhitelistSourceRangesErr error }
func (*FakeOperations) SetStaticIp ¶ added in v0.30.0
func (f *FakeOperations) SetStaticIp(user *database.User, appName, addressName string) error
func (*FakeOperations) WhitelistSourceRanges ¶ added in v0.24.0
type Info ¶
type Info struct { ServicePorts []spec.ServicePort SSLInfo *SSLInfo SourceRanges []string }
type K8sOperations ¶
type K8sOperations interface { UpdateServicePorts(namespace, svcName string, ports []spec.ServicePort) error IsNotFound(err error) bool IsInvalid(err error) bool Service(namespace, svcName string) (*spec.Service, error) SetLoadBalancerSourceRanges(namespace, svcName string, sourceRanges []string) error HasIngress(namespace, name string) (bool, error) }
type Operations ¶
type Operations interface { EnableSSL(user *database.User, appName, cert string, only bool) error SetStaticIp(user *database.User, appName, addressName string) error Info(user *database.User, appName string) (*Info, error) WhitelistSourceRanges(user *database.User, appName string, sourceRanges []string) error }
type SSLInfo ¶
type SSLInfo struct { ServicePort *spec.ServicePort Cert string }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(ops Operations) *Service
func (*Service) Info ¶
func (svc *Service) Info(ctx context.Context, req *svcpb.InfoRequest) (*svcpb.InfoResponse, error)
func (*Service) RegisterService ¶
func (*Service) SetStaticIp ¶ added in v0.30.0
func (*Service) WhitelistSourceRanges ¶ added in v0.24.0
type ServiceOperations ¶
type ServiceOperations struct {
// contains filtered or unexported fields
}
func NewOperations ¶
func NewOperations(aops AppOperations, cops CloudProviderOperations, k8s K8sOperations) *ServiceOperations
func (*ServiceOperations) SetStaticIp ¶ added in v0.30.0
func (ops *ServiceOperations) SetStaticIp(user *database.User, appName, addressName string) error
func (*ServiceOperations) WhitelistSourceRanges ¶ added in v0.24.0
Click to show internal directories.
Click to hide internal directories.