dgclient

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DGateClient

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

func NewDGateClient

func NewDGateClient(baseUrl string, opts ...Options) (*DGateClient, error)

func (*DGateClient) BaseUrl

func (d *DGateClient) BaseUrl() string

func (*DGateClient) CreateCollection

func (d *DGateClient) CreateCollection(svc *spec.Collection) error

func (*DGateClient) CreateDocument

func (d *DGateClient) CreateDocument(doc *spec.Document) error

func (*DGateClient) CreateDomain

func (d *DGateClient) CreateDomain(dm *spec.Domain) error

func (*DGateClient) CreateModule

func (d *DGateClient) CreateModule(mod *spec.Module) error

func (*DGateClient) CreateNamespace

func (d *DGateClient) CreateNamespace(ns *spec.Namespace) error

func (*DGateClient) CreateRoute

func (d *DGateClient) CreateRoute(rt *spec.Route) error

func (*DGateClient) CreateService

func (d *DGateClient) CreateService(svc *spec.Service) error

func (*DGateClient) DeleteCollection

func (d *DGateClient) DeleteCollection(name, namespace string) error

func (*DGateClient) DeleteDocument

func (d *DGateClient) DeleteDocument(id, namespace string) error

func (*DGateClient) DeleteDomain

func (d *DGateClient) DeleteDomain(name, namespace string) error

func (*DGateClient) DeleteModule

func (d *DGateClient) DeleteModule(name, namespace string) error

func (*DGateClient) DeleteNamespace

func (d *DGateClient) DeleteNamespace(name string) error

func (*DGateClient) DeleteRoute

func (d *DGateClient) DeleteRoute(name, namespace string) error

func (*DGateClient) DeleteService

func (d *DGateClient) DeleteService(name, namespace string) error

func (*DGateClient) GetCollection

func (d *DGateClient) GetCollection(name, namespace string) (*spec.Collection, error)

func (*DGateClient) GetDocument

func (d *DGateClient) GetDocument(id, namespace string) (*spec.Document, error)

func (*DGateClient) GetDomain

func (d *DGateClient) GetDomain(name, namespace string) (*spec.Domain, error)

func (*DGateClient) GetModule

func (d *DGateClient) GetModule(name, namespace string) (*spec.Module, error)

func (*DGateClient) GetNamespace

func (d *DGateClient) GetNamespace(name string) (*spec.Namespace, error)

func (*DGateClient) GetRoute

func (d *DGateClient) GetRoute(name, namespace string) (*spec.Route, error)

func (*DGateClient) GetService

func (d *DGateClient) GetService(name, namespace string) (*spec.Service, error)

func (*DGateClient) Init

func (d *DGateClient) Init(baseUrl string, opts ...Options) error

func (*DGateClient) ListCollection

func (d *DGateClient) ListCollection() ([]*spec.Collection, error)

func (*DGateClient) ListDocument

func (d *DGateClient) ListDocument() ([]*spec.Document, error)

func (*DGateClient) ListDomain

func (d *DGateClient) ListDomain() ([]*spec.Domain, error)

func (*DGateClient) ListModule

func (d *DGateClient) ListModule() ([]*spec.Module, error)

func (*DGateClient) ListNamespace

func (d *DGateClient) ListNamespace() ([]*spec.Namespace, error)

func (*DGateClient) ListRoute

func (d *DGateClient) ListRoute() ([]*spec.Route, error)

func (*DGateClient) ListService

func (d *DGateClient) ListService() ([]*spec.Service, error)

type ListResponseWrapper

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

type M

type M map[string]any

type Options

type Options func(*DGateClient)

func WithBasicAuth

func WithBasicAuth(username, password string) Options

func WithHttpClient

func WithHttpClient(client *http.Client) Options

func WithUserAgent

func WithUserAgent(ua string) 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