dnsadapter

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterOrgGetter

type ClusterOrgGetter interface {
	GetOrganization(ctx context.Context, clusterID uint) (auth.Organization, error)
}

ClusterOrgGetter can be used to get the organization a cluster belongs to

type ClusterOrgGetterImpl

type ClusterOrgGetterImpl struct {
	// contains filtered or unexported fields
}

ClusterOrgGetterImpl implements a ClusterOrgGetter

func NewClusterOrgGetter

func NewClusterOrgGetter(clusterGetter CommonClusterGetter, orgGetter OrgGetter) ClusterOrgGetterImpl

NewClusterOrgGetter returns a new ClusterOrgGetter implementation

func (ClusterOrgGetterImpl) GetOrganization

func (g ClusterOrgGetterImpl) GetOrganization(ctx context.Context, clusterID uint) (auth.Organization, error)

GetOrganization returns the organization the specified cluster belongs to

type ClusterPropertyGetter

type ClusterPropertyGetter struct {
	// contains filtered or unexported fields
}

ClusterPropertyGetter can be used to get a cluster's properties

func NewClusterPropertyGetter

func NewClusterPropertyGetter(clusterGetter CommonClusterGetter) ClusterPropertyGetter

NewClusterPropertyGetter returns a new ClusterPropertyGetter instance

func (ClusterPropertyGetter) GetClusterOrgID

func (g ClusterPropertyGetter) GetClusterOrgID(ctx context.Context, clusterID uint) (uint, error)

GetClusterOrgID returns the specified cluster's organization ID

func (ClusterPropertyGetter) GetClusterUID

func (g ClusterPropertyGetter) GetClusterUID(ctx context.Context, clusterID uint) (string, error)

GetClusterUID returns the specified cluster's UID

type CommonClusterGetter

type CommonClusterGetter interface {
	GetClusterByIDOnly(ctx context.Context, clusterID uint) (cluster.CommonCluster, error)
}

CommonClusterGetter can be used to get a cluster by its ID

type DNSServiceClient

type DNSServiceClient interface {
	IsDomainRegistered(orgID uint, domain string) (bool, error)
	RegisterDomain(orgID uint, domain string) error
}

DNSServiceClient can be used to register and check registration of an organization's domain

type OrgDomainService

type OrgDomainService struct {
	// contains filtered or unexported fields
}

OrgDomainService can be used to ensure that the organization's domain is registered with a DNS service

func NewOrgDomainService

func NewOrgDomainService(baseDomain string, dnsServiceClient DNSServiceClient, clusterOrgGetter ClusterOrgGetter, logger common.Logger) OrgDomainService

NewOrgDomainService returns a new OrgDomainService initialized with the specified values

func (OrgDomainService) EnsureOrgDomain

func (s OrgDomainService) EnsureOrgDomain(ctx context.Context, clusterID uint) error

EnsureOrgDomain makes sure that the organization the specified cluster belongs to has its domain registered with the DNS service

type OrgGetter

type OrgGetter interface {
	Get(ctx context.Context, id uint) (auth.Organization, error)
}

OrgGetter can be used to get an organization by its ID

Jump to

Keyboard shortcuts

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