director

package
v0.0.0-...-a423d60 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRootTenantByExternalIDQuery

func GetRootTenantByExternalIDQuery(tenantID string) string

func InvalidateSystemAuthOneTimeTokenQuery

func InvalidateSystemAuthOneTimeTokenQuery(authID string) string

func IsGQLNotFoundError

func IsGQLNotFoundError(err error) bool

func ListCertificateSubjectMappingsQuery

func ListCertificateSubjectMappingsQuery(first int, after string) string

func SystemAuthByTokenQuery

func SystemAuthByTokenQuery(token string) string

func SystemAuthQuery

func SystemAuthQuery(authID string) string

func TenantByExternalIDQuery

func TenantByExternalIDQuery(tenantID string) string

func TenantByInternalIDQuery

func TenantByInternalIDQuery(tenantID string) string

func TenantByLowestOwnerForResourceQuery

func TenantByLowestOwnerForResourceQuery(resourceID, resourceType string) string

func UpdateSystemAuthQuery

func UpdateSystemAuthQuery(sysAuth *model.SystemAuth) (string, error)

Types

type CertSubjectMappingResponse

type CertSubjectMappingResponse struct {
	Result *schema.CertificateSubjectMappingPage `json:"result"`
}

type Client

type Client interface {
	GetTenantByExternalID(ctx context.Context, tenantID string) (*schema.Tenant, error)
	GetTenantByInternalID(ctx context.Context, tenantID string) (*schema.Tenant, error)
	GetTenantByLowestOwnerForResource(ctx context.Context, resourceID, resourceType string) (string, error)
	GetSystemAuthByID(ctx context.Context, authID string) (*model.SystemAuth, error)
	GetSystemAuthByToken(ctx context.Context, token string) (*model.SystemAuth, error)
	UpdateSystemAuth(ctx context.Context, sysAuth *model.SystemAuth) (UpdateAuthResult, error)
	InvalidateSystemAuthOneTimeToken(ctx context.Context, authID string) error
	ListCertificateSubjectMappings(ctx context.Context, after string) (*schema.CertificateSubjectMappingPage, error)
}

func NewClient

func NewClient(gqlClient *graphql.Client) Client

type ClientProvider

type ClientProvider interface {
	Client() Client
}

type Config

type Config struct {
	InternalURL        string        `envconfig:"default=http://127.0.0.1:3000/graphql"`
	InternalGatewayURL string        `envconfig:"default=http://127.0.0.1:3000/graphql"`
	ClientTimeout      time.Duration `envconfig:"default=115s"`
	SkipSSLValidation  bool          `envconfig:"default=false"`
}

type DirectorClientProvider

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

func NewClientProvider

func NewClientProvider(directorURL string, timeout time.Duration, skipSSLValidation bool) DirectorClientProvider

func (DirectorClientProvider) Client

func (cp DirectorClientProvider) Client() Client

type NotFoundError

type NotFoundError struct {
}

func (*NotFoundError) Error

func (fe *NotFoundError) Error() string

func (*NotFoundError) NotFound

func (fe *NotFoundError) NotFound() bool

type RuntimeResponse

type RuntimeResponse struct {
	Result *schema.Runtime `json:"result"`
}

type SystemAuthResponse

type SystemAuthResponse struct {
	Result *schema.AppSystemAuth `json:"result"`
}

type TenantByLowestOwnerForResourceResponse

type TenantByLowestOwnerForResourceResponse struct {
	Result string `json:"result"`
}

type TenantResponse

type TenantResponse struct {
	Result *schema.Tenant `json:"result"`
}

type UpdateAuthResult

type UpdateAuthResult struct {
	ID string `json:"id"`
}

type UpdateSystemAuthResponse

type UpdateSystemAuthResponse struct {
	Result UpdateAuthResult `json:"result"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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