Versions in this module Expand all Collapse all v0 v0.11.1 Jun 30, 2024 Changes in this version type ChangeLog + func (cl *ChangeLog) RenewID() *ChangeLog v0.11.0 Jun 20, 2024 v0.10.1 Jun 14, 2024 v0.10.0 Jun 13, 2024 Changes in this version type ChangeLog + func NewNoopChangeLog() *ChangeLog v0.9.1 Jun 2, 2024 v0.9.0 Jun 2, 2024 v0.8.1 May 31, 2024 v0.8.0 May 29, 2024 Changes in this version + const Secrets + func ErrSecretNotFound(secret string) error type Command + var AddSecretCommand Command = newCommand(Add, Secrets) + var DeleteSecretCommand Command = newCommand(Delete, Secrets) + func (clc Command) IsRestart() bool + func (clc Command) IsShutdown() bool type DGateDomain + CreatedAt time.Time + UpdatedAt time.Time + type DGateSecret struct + CreatedAt time.Time + Data string + Name string + Namespace *DGateNamespace + Tags []string + UpdatedAt time.Time + func TransformSecret(ns *DGateNamespace, secret *Secret) (*DGateSecret, error) + func TransformSecrets(ns *DGateNamespace, secrets ...*Secret) ([]*DGateSecret, error) + func (n *DGateSecret) GetName() string + type Secret struct + Data string + Name string + NamespaceName string + Tags []string + func TransformDGateSecret(sec *DGateSecret) *Secret + func TransformDGateSecrets(secrets ...*DGateSecret) []*Secret + func (n *Secret) GetName() string v0.7.1 Apr 22, 2024 v0.7.0 Apr 22, 2024 Changes in this version + const Add + const Collections + const Delete + const Documents + const Domains + const Modules + const Namespaces + const Routes + const Services + var DefaultNamespace = &Namespace + func ErrCollectionNotFound(col string) error + func ErrDocumentNotFound(doc string) error + func ErrDomainNotFound(domain string) error + func ErrModuleNotFound(mod string) error + func ErrNamespaceNotFound(ns string) error + func ErrRouteNotFound(route string) error + func ErrServiceNotFound(svc string) error + type Action string + func (act Action) String() string + type ChangeLog struct + Cmd Command + ID string + Item any + Name string + Namespace string + Version int + func NewChangeLog(item Named, namespace string, cmd Command) *ChangeLog + func (cl *ChangeLog) PushError(err error) + func (cl *ChangeLog) SetErrorChan(errChan chan error) + type Collection struct + Name string + NamespaceName string + Schema any + Tags []string + Type CollectionType + Visibility CollectionVisibility + func TransformDGateCollection(col *DGateCollection) *Collection + func TransformDGateCollections(collections ...*DGateCollection) []*Collection + func (n *Collection) GetName() string + type CollectionType string + const CollectionTypeDocument + const CollectionTypeFetcher + type CollectionVisibility string + const CollectionVisibilityPrivate + const CollectionVisibilityPublic + type Command string + var AddCollectionCommand Command = newCommand(Add, Collections) + var AddDocumentCommand Command = newCommand(Add, Documents) + var AddDomainCommand Command = newCommand(Add, Domains) + var AddModuleCommand Command = newCommand(Add, Modules) + var AddNamespaceCommand Command = newCommand(Add, Namespaces) + var AddRouteCommand Command = newCommand(Add, Routes) + var AddServiceCommand Command = newCommand(Add, Services) + var DeleteCollectionCommand Command = newCommand(Delete, Collections) + var DeleteDocumentCommand Command = newCommand(Delete, Documents) + var DeleteDomainCommand Command = newCommand(Delete, Domains) + var DeleteModuleCommand Command = newCommand(Delete, Modules) + var DeleteNamespaceCommand Command = newCommand(Delete, Namespaces) + var DeleteRouteCommand Command = newCommand(Delete, Routes) + var DeleteServiceCommand Command = newCommand(Delete, Services) + var NoopCommand Command = Command("noop") + func (clc Command) Action() Action + func (clc Command) IsNoop() bool + func (clc Command) Resource() Resource + func (clc Command) String() string + type DGateCollection struct + Name string + Namespace *DGateNamespace + Schema *jsonschema.Schema + SchemaPayload string + Tags []string + Type CollectionType + Visibility CollectionVisibility + func TransformCollection(ns *DGateNamespace, mods []*DGateModule, col *Collection) *DGateCollection + func TransformCollections(ns *DGateNamespace, mods []*DGateModule, collections ...*Collection) []*DGateCollection + func (n *DGateCollection) GetName() string + type DGateDocument struct + Collection *DGateCollection + CreatedAt time.Time + Data string + ID string + Namespace *DGateNamespace + UpdatedAt time.Time + func TransformDocument(ns *DGateNamespace, col *DGateCollection, document *Document) *DGateDocument + func TransformDocuments(ns *DGateNamespace, col *DGateCollection, documents ...*Document) []*DGateDocument + func (n *DGateDocument) GetName() string + type DGateDomain struct + Cert string + Key string + Name string + Namespace *DGateNamespace + Patterns []string + Priority int + TLSCert *tls.Certificate + Tags []string + func TransformDomain(ns *DGateNamespace, dom *Domain) *DGateDomain + func TransformDomains(ns *DGateNamespace, domains ...*Domain) []*DGateDomain + type DGateModule struct + Name string + Namespace *DGateNamespace + Payload string + Permissions []string + Tags []string + Type ModuleType + func TransformModule(ns *DGateNamespace, m *Module) (*DGateModule, error) + func TransformModules(ns *DGateNamespace, modules ...*Module) ([]*DGateModule, error) + func (m *DGateModule) GetName() string + type DGateNamespace struct + Name string + Tags []string + func TransformNamespace(ns *Namespace) *DGateNamespace + func TransformNamespaces(namespaces ...*Namespace) []*DGateNamespace + func (ns *DGateNamespace) GetName() string + type DGateRoute struct + Methods []string + Modules []*DGateModule + Name string + Namespace *DGateNamespace + Paths []string + PreserveHost bool + Service *DGateService + StripPath bool + Tags []string + func TransformRoute(r Route) *DGateRoute + func TransformRoutes(routes ...Route) []*DGateRoute + func (r *DGateRoute) GetName() string + type DGateService struct + ConnectTimeout time.Duration + DisableQueryParams bool + HTTP2Only bool + HideDGateHeaders bool + Name string + Namespace *DGateNamespace + RequestTimeout time.Duration + Retries int + RetryTimeout time.Duration + TLSSkipVerify bool + Tags []string + URLs []*url.URL + func TransformService(ns *DGateNamespace, s *Service) *DGateService + func TransformServices(ns *DGateNamespace, services ...*Service) []*DGateService + func (s *DGateService) GetName() string + type Document struct + CollectionName string + CreatedAt time.Time + Data any + ID string + NamespaceName string + UpdatedAt time.Time + func TransformDGateDocument(document *DGateDocument) *Document + func TransformDGateDocuments(documents ...*DGateDocument) []*Document + func (n *Document) GetName() string + type Domain struct + Cert string + Key string + Name string + NamespaceName string + Patterns []string + Priority int + Tags []string + func TransformDGateDomain(dom *DGateDomain) *Domain + func TransformDGateDomains(domains ...*DGateDomain) []*Domain + func (n *Domain) GetName() string + type Module struct + Name string + NamespaceName string + Payload string + Permissions []string + Tags []string + Type ModuleType + func TransformDGateModule(m *DGateModule) *Module + func TransformDGateModules(modules ...*DGateModule) []*Module + func (m *Module) GetName() string + type ModuleType string + const ModuleTypeJavascript + const ModuleTypeTypescript + func (m ModuleType) String() string + func (m ModuleType) Valid() bool + type Name string + type Named interface + GetName func() string + type Namespace struct + Name string + Tags []string + func TransformDGateNamespace(ns *DGateNamespace) *Namespace + func TransformDGateNamespaces(namespaces ...*DGateNamespace) []*Namespace + func (n *Namespace) GetName() string + type RFC3339Time time.Time + func (t *RFC3339Time) UnmarshalJSON(data []byte) error + func (t RFC3339Time) MarshalJSON() ([]byte, error) + type Resource string + func (resource1 Resource) IsRelatedTo(resource2 Resource) bool + func (rt Resource) String() string + type ResponseWriterTracker interface + BytesWritten func() int64 + HeadersSent func() bool + Status func() int + func NewResponseWriterTracker(rw http.ResponseWriter) ResponseWriterTracker + type Route struct + Methods []string + Modules []string + Name string + NamespaceName string + Paths []string + PreserveHost bool + Schemes []string + ServiceName string + StripPath bool + Tags []string + func TransformDGateRoute(r *DGateRoute) *Route + func TransformDGateRoutes(routes ...*DGateRoute) []*Route + func (m *Route) GetName() string + type Service struct + ConnectTimeout *time.Duration + DisableQueryParams *bool + HTTP2Only *bool + HideDGateHeaders *bool + Name string + NamespaceName string + RequestTimeout *time.Duration + Retries *int + RetryTimeout *time.Duration + TLSSkipVerify *bool + Tags []string + URLs []string + func TransformDGateService(s *DGateService) *Service + func TransformDGateServices(services ...*DGateService) []*Service + func (s *Service) GetName() string