apis

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: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ORG_CONTEXT_NAME = "x-organization-id"
)

Variables

This section is empty.

Functions

func DecodeBody

func DecodeBody(c *gin.Context, result interface{}) error

func NotImplemented

func NotImplemented(c *gin.Context)

Temp

Types

type Api

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

func NewApi

func NewApi(config *config.Config) *Api

func (*Api) Run

func (api *Api) Run(listener string) error

type ApiKeyHandler

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

func NewApiKeyHandler

func NewApiKeyHandler(apiKeySvc services.ApiKeyProvider) *ApiKeyHandler

func (*ApiKeyHandler) CreateKey

func (aka *ApiKeyHandler) CreateKey(c *gin.Context)

func (*ApiKeyHandler) DeleteKey

func (aka *ApiKeyHandler) DeleteKey(c *gin.Context)

func (*ApiKeyHandler) GetKey

func (aka *ApiKeyHandler) GetKey(c *gin.Context)

func (*ApiKeyHandler) ListApiKeys

func (aka *ApiKeyHandler) ListApiKeys(c *gin.Context)

type CreateSchemaVersionRequest

type CreateSchemaVersionRequest struct {
	FromVersion int               `json:"from_version"`
	Resources   map[string]string `json:"resources"`
}

type ListMeta

type ListMeta struct {
	Offset int
	Limit  int
}

func ProcessListMetadata

func ProcessListMetadata(c *gin.Context) *ListMeta

type Middlewares

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

func NewMiddlewares

func NewMiddlewares(apiKeySvc services.ApiKeyProvider) *Middlewares

func (*Middlewares) ValidateRequest

func (m *Middlewares) ValidateRequest(c *gin.Context)

type NamespaceHandler

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

func (*NamespaceHandler) CreateNamespace

func (nsApi *NamespaceHandler) CreateNamespace(c *gin.Context)

func (*NamespaceHandler) DeleteNamespace

func (nsApi *NamespaceHandler) DeleteNamespace(c *gin.Context)

func (*NamespaceHandler) DeleteNamespaceVariable

func (nsApi *NamespaceHandler) DeleteNamespaceVariable(c *gin.Context)

func (*NamespaceHandler) GetNamespace

func (nsApi *NamespaceHandler) GetNamespace(c *gin.Context)

func (*NamespaceHandler) GetNamespaceVariable

func (nsApi *NamespaceHandler) GetNamespaceVariable(c *gin.Context)

func (*NamespaceHandler) ListNamespaceVariables

func (nsApi *NamespaceHandler) ListNamespaceVariables(c *gin.Context)

func (*NamespaceHandler) ListNamespaces

func (nsApi *NamespaceHandler) ListNamespaces(c *gin.Context)

func (*NamespaceHandler) PostNamespaceVariable

func (nsApi *NamespaceHandler) PostNamespaceVariable(c *gin.Context)

func (*NamespaceHandler) PutNamespaceVariable

func (nsApi *NamespaceHandler) PutNamespaceVariable(c *gin.Context)

func (*NamespaceHandler) Resolve

func (nsApi *NamespaceHandler) Resolve(c *gin.Context)

func (*NamespaceHandler) UpdateNamespace

func (nsApi *NamespaceHandler) UpdateNamespace(c *gin.Context)

type NewApiKeyRequest

type NewApiKeyRequest struct {
	Name   string            `json:"name"`
	Scopes map[string]string `json:"scopes"`
}

type NewNamespaceRequest

type NewNamespaceRequest struct {
	Name          string `json:"name"`
	Schema        string `json:"schema_id"`
	SchemaVersion string `json:"schema_version"`
}

type NewNamespaceVariable

type NewNamespaceVariable struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type NewOrganizationRequest

type NewOrganizationRequest struct {
	Request bool
	Name    string `json:"name"`
}

type NewSchemaRequest

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

type OrganizationHandler

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

func (*OrganizationHandler) CreateOrganization

func (orgApi *OrganizationHandler) CreateOrganization(c *gin.Context)

func (*OrganizationHandler) DeleteOrganization

func (orgApi *OrganizationHandler) DeleteOrganization(c *gin.Context)

func (*OrganizationHandler) GetListOfOrganizations

func (orgApi *OrganizationHandler) GetListOfOrganizations(c *gin.Context)

func (*OrganizationHandler) GetOrganization

func (orgApi *OrganizationHandler) GetOrganization(c *gin.Context)

func (*OrganizationHandler) UpdateOrganization

func (orgApi *OrganizationHandler) UpdateOrganization(c *gin.Context)

type ResolveResourceResponse

type ResolveResourceResponse struct {
	ResourceName string `json:"name"`
	Pattern      string `json:"pattern"`
	Value        string `json:"value"`
}

type ResolveSchemaVersionRequest

type ResolveSchemaVersionRequest struct {
	ResouceName string            `json:"resource"`
	Variables   map[string]string `json:"variables"`
}

type SchemaApiHandler

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

func (*SchemaApiHandler) CreateSchema

func (sApi *SchemaApiHandler) CreateSchema(c *gin.Context)

Create a new schema and a new version 1 for that schema

func (*SchemaApiHandler) CreateSchemaVersion

func (sApi *SchemaApiHandler) CreateSchemaVersion(c *gin.Context)

func (*SchemaApiHandler) DeleteSchema

func (sApi *SchemaApiHandler) DeleteSchema(c *gin.Context)

func (*SchemaApiHandler) DeleteSchemaVersion

func (sApi *SchemaApiHandler) DeleteSchemaVersion(c *gin.Context)

func (*SchemaApiHandler) GetSchema

func (sApi *SchemaApiHandler) GetSchema(c *gin.Context)

func (*SchemaApiHandler) GetSchemaVersion

func (sApi *SchemaApiHandler) GetSchemaVersion(c *gin.Context)

func (*SchemaApiHandler) ListSchemaVersions

func (sApi *SchemaApiHandler) ListSchemaVersions(c *gin.Context)

func (*SchemaApiHandler) ListSchemas

func (sApi *SchemaApiHandler) ListSchemas(c *gin.Context)

func (*SchemaApiHandler) ResolveResourceName

func (sApi *SchemaApiHandler) ResolveResourceName(c *gin.Context)

func (*SchemaApiHandler) UpdateSchema

func (sApi *SchemaApiHandler) UpdateSchema(c *gin.Context)

func (*SchemaApiHandler) UpdateSchemaVersion

func (sApi *SchemaApiHandler) UpdateSchemaVersion(c *gin.Context)

type TerraxenClaims

type TerraxenClaims struct {
	jwt.StandardClaims
	OrganizationId string
	UserId         string
}

type UpdateNamespaceRequest

type UpdateNamespaceRequest struct {
	Name          string `json:"name"`
	SchemaVersion string `json:"schema_version"`
}

type UpdateNamespaceVariable

type UpdateNamespaceVariable struct {
	Value string `json:"value"`
}

type UpdateOrganizationRequest

type UpdateOrganizationRequest struct {
	Name      string            `json:"name"`
	Variables map[string]string `json:"variables"`
}

type UpdateSchemaRequest

type UpdateSchemaRequest struct {
	Name      string            `json:"name"`
	Resources map[string]string `json:"resources"`
}

type UpdateSchemaVersionRequest

type UpdateSchemaVersionRequest struct {
	Published bool              `json:"published"`
	Resources map[string]string `json:"resources"`
}

Jump to

Keyboard shortcuts

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