api

package
v0.0.0-...-8220f0d Latest Latest
Warning

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

Go to latest
Published: Feb 3, 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 Controller

type Controller interface {
	// GetByLabel(c *gin.Context)
	RegisterRoutes(router *gin.Engine)
}

Controller is the Key-Value controller

func New

func New(kvService kv.Service, sbacService sbac.Service) Controller

New returns a new kv.Controller

func NewWithService

func NewWithService(service Service) Controller

NewWithService returns a new kv.Controller

type Error

type Error struct {
	Error string `json:"error"`
}

Error ...

type LabelObject

type LabelObject struct {
	Label     string      `json:"label"`
	Object    interface{} `json:"object"`
	VersionID string      `json:"versionId"`
}

LabelObject ...

type LabelVersionID

type LabelVersionID struct {
	Label     string `json:"label"`
	VersionID string `json:"versionId"`
}

LabelVersionID ...

type ListObjectsResponse

type ListObjectsResponse struct {
	Pairs []LabelObject `json:"pairs"`
}

ListObjectsResponse contains a full json graph

type ListVersionIDsResponse

type ListVersionIDsResponse struct {
	Pairs []LabelVersionID `json:"pairs"`
}

ListVersionIDsResponse contains a collection of LabelVersionIDs

type ObjectResponse

type ObjectResponse struct {
	Object interface{} `json:"object"`
}

ObjectResponse contains a full json graph

type Service

type Service interface {
	GetByLabel(label string) (LabelObject, int, error)
	GetByPrefix(prefix string) ([]LabelObject, int, error)
	GetVersionID(label string) (string, int, error)
	GetVersionIDByPrefix(prefixz string) ([]LabelVersionID, int, error)
}

Service interface

func NewService

func NewService(kvStore kv.Service, sbac sbac.Service) Service

NewService ...

type VersionIDResponse

type VersionIDResponse struct {
	VersionID string `json:"versionId"`
}

VersionIDResponse contains only a version id

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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