api

package
v0.0.0-...-5d9cc31 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrSchemaNotFound       = "Schema not found"
	ErrInBackendStore       = "Error in the backend datastore"
	ErrAuthStore            = "Error in authorization backend"
	ErrEncoding             = "Error encoding response"
	ErrDecoding             = "Error decoding request"
	ErrSubjectNotFound      = "Subject not found"
	ErrInvalidSchema        = "Invalid Avro schema"
	ErrIncompatibleSchema   = "Incompatible Avro schema"
	ErrInvalidCompatibility = "Invalid compatibility level"
	ErrUnauthorized         = "Client authorization required"
	ErrUserExists           = "User already exists"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiServer

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

func NewApiServer

func NewApiServer(addr string, stor storage.Storage, watcher Watcher, multiuser bool, topic string) *ApiServer

func (*ApiServer) CheckCompatibility

func (as *ApiServer) CheckCompatibility(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*ApiServer) CheckRegistered

func (as *ApiServer) CheckRegistered(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*ApiServer) GetGlobalConfig

func (as *ApiServer) GetGlobalConfig(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

func (*ApiServer) GetSchema

func (as *ApiServer) GetSchema(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*ApiServer) GetSubjectConfig

func (as *ApiServer) GetSubjectConfig(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*ApiServer) GetSubjects

func (as *ApiServer) GetSubjects(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*ApiServer) GetVersion

func (as *ApiServer) GetVersion(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*ApiServer) GetVersionList

func (as *ApiServer) GetVersionList(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*ApiServer) NewSchema

func (as *ApiServer) NewSchema(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*ApiServer) Start

func (as *ApiServer) Start() error

func (*ApiServer) UpdateGlobalConfig

func (as *ApiServer) UpdateGlobalConfig(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (*ApiServer) UpdateSubjectConfig

func (as *ApiServer) UpdateSubjectConfig(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

type CompatibilityMessage

type CompatibilityMessage struct {
	IsCompatible bool `json:"is_compatible"`
}

type ErrorMessage

type ErrorMessage struct {
	ErrorCode int    `json:"error_code"`
	Message   string `json:"message"`
}

type Schema

type Schema struct {
	Subject string `json:"subject"`
	ID      int    `json:"id"`
	Version int    `json:"version"`
	Schema  string `json:"schema"`
}

type SchemaMessage

type SchemaMessage struct {
	Schema string `json:"schema"`
}

type UserRequest

type UserRequest struct {
	Name  string `json:"name"`
	Admin bool   `json:"admin"`
}

type VersionMessage

type VersionMessage struct {
	Name    string `json:"name"`
	Version int    `json:"version"`
	Schema  string `json:"schema"`
}

type Watcher

type Watcher interface {
	Watch(string)
}

Jump to

Keyboard shortcuts

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