mongobackend

package
v0.0.0-...-d33a02e Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseCursor

func CloseCursor(ctx context.Context, cur *mongo.Cursor)

func RandString

func RandString(n int) string

Types

type ApiKeyService

type ApiKeyService struct {
	BaseService
}

func NewApiKeyService

func NewApiKeyService(cfg *config.Config) *ApiKeyService

func (*ApiKeyService) DeleteKey

func (akSvc *ApiKeyService) DeleteKey(apiId string) error

func (*ApiKeyService) GenerateNewApiKey

func (akSvc *ApiKeyService) GenerateNewApiKey(orgId string) (*services.ApiKey, error)

func (*ApiKeyService) GetKey

func (akSvc *ApiKeyService) GetKey(key string) *services.ApiKey

func (*ApiKeyService) ListKeys

func (akSvc *ApiKeyService) ListKeys(orgId string) ([]*services.ApiKey, error)

type BaseService

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

func (*BaseService) Connect

func (bs *BaseService) Connect(cfg *config.Config)

type NamespaceService

type NamespaceService struct {
	BaseService
	// contains filtered or unexported fields
}

func NewNamespaceService

func NewNamespaceService(config *config.Config) *NamespaceService

func (*NamespaceService) CreateNamespace

func (nsSvc *NamespaceService) CreateNamespace(orgId string, name string, schemaId string, schemaVersion string, vars map[string]string) (*services.Namespace, error)

func (*NamespaceService) CreateNamespaceVariable

func (nsSvc *NamespaceService) CreateNamespaceVariable(orgId string, nsId string, key string, value string) (*services.NamespaceVar, error)

func (*NamespaceService) DeleteNamespace

func (nsSvc *NamespaceService) DeleteNamespace(orgId string, nsId string) error

func (*NamespaceService) DeleteNamespaceVariable

func (nsSvc *NamespaceService) DeleteNamespaceVariable(orgId string, nsId string, varId string) error

func (*NamespaceService) ExistsByName

func (nsSvc *NamespaceService) ExistsByName(orgId string, nsName string) bool

func (*NamespaceService) GetNamespaceById

func (nsSvc *NamespaceService) GetNamespaceById(orgId string, nsId string) (*services.Namespace, error)

func (*NamespaceService) GetNamespaceVariable

func (nsSvc *NamespaceService) GetNamespaceVariable(orgId string, nsId string, varId string) (*services.NamespaceVar, error)

func (*NamespaceService) GetVariablesAsMap

func (nsSvc *NamespaceService) GetVariablesAsMap(orgId string, nsId string) (map[string]string, error)

func (*NamespaceService) ListNamespaceVars

func (nsSvc *NamespaceService) ListNamespaceVars(orgId string, nsId string) ([]*services.NamespaceVar, error)

func (*NamespaceService) ListNamespaces

func (nsSvc *NamespaceService) ListNamespaces(orgId string) ([]*services.Namespace, error)

func (*NamespaceService) NamespaceVariableExists

func (nsSvc *NamespaceService) NamespaceVariableExists(orgId string, nsId string, varId string) bool

func (*NamespaceService) UpdateNamespace

func (nsSvc *NamespaceService) UpdateNamespace(orgId string, nsId string, nsName string, schemaVersion string) error

func (*NamespaceService) UpdateNamespaceVariable

func (nsSvc *NamespaceService) UpdateNamespaceVariable(orgId string, nsId string, varId string, value string) (*services.NamespaceVar, error)

type OrganizationService

type OrganizationService struct {
	BaseService
	// contains filtered or unexported fields
}

func NewOrganizationService

func NewOrganizationService(cfg *config.Config) *OrganizationService

func (OrganizationService) DeleteOrganization

func (orgSvc OrganizationService) DeleteOrganization(organizationId string) error

func (*OrganizationService) ExistsById

func (orgsvc *OrganizationService) ExistsById(orgId string) bool

func (*OrganizationService) ExistsByName

func (orgsvc *OrganizationService) ExistsByName(orgName string) bool

func (*OrganizationService) GetOrganizationById

func (orgsvc *OrganizationService) GetOrganizationById(orgId string) (*services.Organization, error)

func (*OrganizationService) NewOrganization

func (orgsvc *OrganizationService) NewOrganization(orgName string) (*services.Organization, error)

func (*OrganizationService) UpdateOrganization

func (orgSvc *OrganizationService) UpdateOrganization(orgId string, orgName string, orgVars map[string]string) (*services.Organization, error)

type SchemaService

type SchemaService struct {
	BaseService
	// contains filtered or unexported fields
}

func NewSchemaService

func NewSchemaService(cfg *config.Config) *SchemaService

func (*SchemaService) CreateSchema

func (sSvc *SchemaService) CreateSchema(orgId string, name string) (*services.Schema, error)

func (*SchemaService) CreateSchemaVersion

func (sSvc *SchemaService) CreateSchemaVersion(orgId string, schemaId string, resources map[string]string, published bool) (*services.SchemaVersion, error)

func (*SchemaService) DeleteSchema

func (sSvc *SchemaService) DeleteSchema(orgId string, schemaId string) error

func (*SchemaService) GetSchemaById

func (sSvc *SchemaService) GetSchemaById(orgId string, schemaId string) (*services.Schema, error)

func (*SchemaService) GetSchemaVersion

func (sSvc *SchemaService) GetSchemaVersion(orgId string, schemaId string, schemaVersionId string) (*services.SchemaVersion, error)

func (*SchemaService) ListSchemaInOrganization

func (sSvc *SchemaService) ListSchemaInOrganization(orgId string) ([]*services.Schema, error)

List schemas in a given organization by the organization ID

func (*SchemaService) ListSchemaVersions

func (sSvc *SchemaService) ListSchemaVersions(orgId string, schemaId string) ([]*services.SchemaVersion, error)

func (*SchemaService) UpdateSchema

func (sSvc *SchemaService) UpdateSchema(schema services.Schema) error

func (*SchemaService) UpdateSchemaVersion

func (sSvc *SchemaService) UpdateSchemaVersion(orgId string, schemaId string, schemaVersionId string, resources map[string]string, published bool) (*services.SchemaVersion, error)

Jump to

Keyboard shortcuts

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