skhema

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	Metadata   *Metadata       `json:"metadata"`
	Operations []*ApiOperation `json:"operations,omitempty"`
}

type ApiLookupFilter

type ApiLookupFilter struct {
	Id        *string
	Namespace string
	Name      string
	Revision  string
}

type ApiOperation

type ApiOperation struct {
	Name        string                    `json:"name"`
	Path        string                    `json:"path"`
	Method      string                    `json:"method"`
	Params      []*ApiOperationParam      `json:"params,omitempty"`
	Consumables []*ApiOperationConsumable `json:"consumables,omitempty"`
	Producibles []*ApiOperationProducible `json:"producibles,omitempty"`
}

type ApiOperationConsumable

type ApiOperationConsumable struct {
	Format string              `json:"format"`
	Type   string              `json:"type"`
	Schema *ApiOperationSchema `json:"schema"`
}

type ApiOperationParam

type ApiOperationParam struct {
	Name    string `json:"name"`
	Segment string `json:"segment"`
	Type    string `json:"type"`
}

type ApiOperationProducible

type ApiOperationProducible struct {
	Status string              `json:"status"`
	Format string              `json:"format"`
	Type   string              `json:"type"`
	Schema *ApiOperationSchema `json:"schema"`
}

type ApiOperationSchema

type ApiOperationSchema struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
	Revision  string `json:"revision"`
}

type ApisService

type ApisService service

func (*ApisService) Create

func (a *ApisService) Create(resource *Api) error

func (*ApisService) Describe

func (a *ApisService) Describe(lookup *ApiLookupFilter, resource interface{}) error

func (*ApisService) DescribeById

func (a *ApisService) DescribeById(id string, resource interface{}) error

func (*ApisService) Update

func (a *ApisService) Update(resource *Api) error

type Client

type Client struct {
	Types    *TypesService
	Apis     *ApisService
	Services *ServicesService
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *Config) (*Client, error)

type Config

type Config struct {
	Bucket    string
	Namespace string
}

type Metadata

type Metadata struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
	Revision  string `json:"revision"`
}

func (*Metadata) GetId

func (m *Metadata) GetId() string

func (*Metadata) GetUrn

func (m *Metadata) GetUrn() string

type Service

type Service struct {
	Metadata *Metadata `json:"metadata"`
	Api      []string  `json:"api,omitempty"`
}

type ServiceLookupFilter

type ServiceLookupFilter struct {
	Id        *string
	Namespace string
	Name      string
	Revision  string
}

type ServicesService

type ServicesService service

func (*ServicesService) Create

func (t *ServicesService) Create(resource *Service) error

func (*ServicesService) Describe

func (t *ServicesService) Describe(lookup *ServiceLookupFilter, resource interface{}) error

func (*ServicesService) DescribeById

func (t *ServicesService) DescribeById(id string, resource interface{}) error

func (*ServicesService) Update

func (t *ServicesService) Update(resource *Service) error

type Type

type Type struct {
	Metadata *Metadata    `json:"metadata"`
	Type     string       `json:"type"`
	Items    string       `json:"items,omitempty"`
	Fields   []*TypeField `json:"fields,omitempty"`
}

type TypeField

type TypeField struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type TypeLookupFilter

type TypeLookupFilter struct {
	Id        *string
	Namespace string
	Name      string
	Revision  string
}

type TypesService

type TypesService service

func (*TypesService) Create

func (t *TypesService) Create(resource *Type) error

func (*TypesService) Describe

func (t *TypesService) Describe(lookup *TypeLookupFilter, resource interface{}) error

func (*TypesService) DescribeById

func (t *TypesService) DescribeById(id string, resource interface{}) error

func (*TypesService) Update

func (t *TypesService) Update(resource *Type) error

Directories

Path Synopsis
backend

Jump to

Keyboard shortcuts

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