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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckTransactionResponse

type CheckTransactionResponse struct {
	NodeID    uint64 `json:"nodeId"`
	OK        bool   `json:"ok"`
	Signature string `json:"signature"`
}

CheckTransactionResponse ...

type Controller

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

Controller is the Key-Value controller

func New

func New(checkr checker.Service, nodeID uint64) Controller

New returns a new kv.Controller

func NewWithService

func NewWithService(service Service) Controller

NewWithService returns a new api.Controller using given service

type Error

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

Error ...

type Service

type Service interface {
	Check(ctx context.Context, tx *sbacapi.Transaction) (interface{}, int, error)
}

Service interface

func NewService

func NewService(checkr checker.Service, nodeID uint64, validator sbacapi.TransactionValidator) Service

NewService ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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