dgclient

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DGateCollectionClient added in v0.8.0

type DGateCollectionClient interface {
	GetCollection(name, namespace string) (*spec.Collection, error)
	CreateCollection(svc *spec.Collection) error
	DeleteCollection(name, namespace string) error
	ListCollection(namespace string) ([]*spec.Collection, error)
}

type DGateDocumentClient added in v0.8.0

type DGateDocumentClient interface {
	GetDocument(id, namespace, collection string) (*spec.Document, error)
	CreateDocument(doc *spec.Document) error
	DeleteDocument(id, namespace, collection string) error
	DeleteAllDocument(namespace, collection string) error
	ListDocument(namespace, collection string) ([]*spec.Document, error)
}

type DGateDomainClient added in v0.8.0

type DGateDomainClient interface {
	GetDomain(name, namespace string) (*spec.Domain, error)
	CreateDomain(dom *spec.Domain) error
	DeleteDomain(name, namespace string) error
	ListDomain(namespace string) ([]*spec.Domain, error)
}

type DGateModuleClient added in v0.8.0

type DGateModuleClient interface {
	GetModule(name, namespace string) (*spec.Module, error)
	CreateModule(mod *spec.Module) error
	DeleteModule(name, namespace string) error
	ListModule(namespace string) ([]*spec.Module, error)
}

type DGateNamespaceClient added in v0.8.0

type DGateNamespaceClient interface {
	GetNamespace(name string) (*spec.Namespace, error)
	CreateNamespace(ns *spec.Namespace) error
	DeleteNamespace(name string) error
	ListNamespace() ([]*spec.Namespace, error)
}

type DGateRouteClient added in v0.8.0

type DGateRouteClient interface {
	GetRoute(name, namespace string) (*spec.Route, error)
	CreateRoute(rt *spec.Route) error
	DeleteRoute(name, namespace string) error
	ListRoute(namespace string) ([]*spec.Route, error)
}

type DGateSecretClient added in v0.8.0

type DGateSecretClient interface {
	GetSecret(name, namespace string) (*spec.Secret, error)
	CreateSecret(svc *spec.Secret) error
	DeleteSecret(name, namespace string) error
	ListSecret(namespace string) ([]*spec.Secret, error)
}

type DGateServiceClient added in v0.8.0

type DGateServiceClient interface {
	GetService(name, namespace string) (*spec.Service, error)
	CreateService(svc *spec.Service) error
	DeleteService(name, namespace string) error
	ListService(namespace string) ([]*spec.Service, error)
}

type DocumentPayload added in v0.8.0

type DocumentPayload struct {
	Document   string `json:"document"`
	Limit      int    `json:"limit"`
	Offset     int    `json:"offset"`
	Count      int    `json:"count"`
	Collection string `json:"collection"`
	Namespace  string `json:"namespace"`
}

type ListResponseWrapper

type ListResponseWrapper[T any] struct {
	StatusCode int
	Count      int
	Data       []T
}

type M

type M map[string]any

type NamePayload added in v0.8.0

type NamePayload struct {
	Name string `json:"name"`
}

type NamespacePayload added in v0.8.0

type NamespacePayload struct {
	Namespace string `json:"namespace"`
}

type Options

type Options func(DGateClient)

func WithBasicAuth

func WithBasicAuth(username, password string) Options

func WithFollowRedirect added in v0.8.0

func WithFollowRedirect(follow bool) Options

func WithUserAgent

func WithUserAgent(ua string) Options

func WithVerboseLogging added in v0.8.0

func WithVerboseLogging(on bool) Options

type ResponseWrapper

type ResponseWrapper[T any] struct {
	StatusCode int
	Count      int
	Data       T
}

Jump to

Keyboard shortcuts

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