v0.0.0-...-f8e0f19 Latest Latest

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

Go to latest
Published: Jul 24, 2022 License: MIT Imports: 8 Imported by: 0




View Source
const AppName, VersionMajor, VersionMinor, VersionPatch, VersionBuild string = "hypercocoagateway", "0", "0", "1", "d"
View Source
const FullVersion string = AppName + VersionMajor + "." + VersionMinor + "." + VersionPatch + VersionBuild


This section is empty.


This section is empty.


type ApiController

type ApiController struct {
	Router *http.ServeMux
	Conf   *Config

func (*ApiController) Route

func (ac *ApiController) Route()

Route proxies requests restfully to the chain

func (*ApiController) Start

func (ac *ApiController) Start(host, port, sslport string)

Start the webserver. Note that Route must be called first

type Comparser

type Comparser struct {
	Conf *Config

func (*Comparser) AddAsset

func (comp *Comparser) AddAsset(w http.ResponseWriter, r *http.Request) string

AddAsset adds an asset to the chain

func (*Comparser) DeleteAsset

func (comp *Comparser) DeleteAsset(w http.ResponseWriter, r *http.Request) string

DeleteAsset deletes an asset from the chain

func (*Comparser) GetAsset

func (comp *Comparser) GetAsset(w http.ResponseWriter, r *http.Request) string

GetAsset returns a single asset

func (*Comparser) GetAssets

func (comp *Comparser) GetAssets(w http.ResponseWriter, r *http.Request) string

GetAssets returns all assets

func (*Comparser) GetVersion

func (comp *Comparser) GetVersion() string

GetVersion returns the gateway version

func (*Comparser) Init

func (comp *Comparser) Init()

Init the Command Parser. Nothing needs to be done here at the moment

func (*Comparser) UpdateAsset

func (comp *Comparser) UpdateAsset(w http.ResponseWriter, r *http.Request) string

UpdateAsset updates an asset on the chain

type Config

type Config struct {
	Port     string
	SslCert  string
	SslKey   string
	SslPort  string
	Loglevel int


Path Synopsis

Jump to

Keyboard shortcuts

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