gw

package
v0.6.0-RC2 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Copyright 2019-2020 vChain, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2019-2020 vChain, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidItemProof = errors.New("proof does not match the given item")
)

Functions

This section is empty.

Types

type HistoryHandler

type HistoryHandler interface {
	History(w http.ResponseWriter, req *http.Request, pathParams map[string]string)
}

func NewHistoryHandler

func NewHistoryHandler(mux *runtime.ServeMux, client client.ImmuClient) HistoryHandler

type ImmuGwServer

type ImmuGwServer struct {
	Options Options

	Logger logger.Logger
	Pid    server.PIDFile
	Client schema.ImmuServiceClient
	// contains filtered or unexported fields
}

func DefaultServer

func DefaultServer() *ImmuGwServer

func (*ImmuGwServer) Start

func (s *ImmuGwServer) Start() error

func (*ImmuGwServer) Stop

func (s *ImmuGwServer) Stop() error

func (*ImmuGwServer) WithClient

func (c *ImmuGwServer) WithClient(client schema.ImmuServiceClient) *ImmuGwServer

func (*ImmuGwServer) WithLogger

func (c *ImmuGwServer) WithLogger(logger logger.Logger) *ImmuGwServer

func (*ImmuGwServer) WithOptions

func (c *ImmuGwServer) WithOptions(options Options) *ImmuGwServer

type Options

type Options struct {
	Dir           string
	Address       string
	Port          int
	ImmudbAddress string
	ImmudbPort    int
	Detached      bool
	MTLs          bool
	MTLsOptions   client.MTLsOptions
	Config        string
	Pidfile       string
	Logfile       string
}

func DefaultOptions

func DefaultOptions() Options

func (Options) Bind

func (o Options) Bind() string

func (Options) String

func (o Options) String() string

func (Options) WithAddress

func (o Options) WithAddress(address string) Options

WithAddress sets address

func (Options) WithConfig

func (o Options) WithConfig(config string) Options

WithConfig sets config

func (Options) WithDetached

func (o Options) WithDetached(detached bool) Options

WithDetached sets immugw to be run in background

func (Options) WithDir

func (o Options) WithDir(dir string) Options

WithDir sets dir

func (Options) WithImmudbAddress

func (o Options) WithImmudbAddress(immudbAddress string) Options

WithImmudbAddress sets immudbAddress

func (Options) WithImmudbPort

func (o Options) WithImmudbPort(immudbPort int) Options

WithImmudbPort sets immudbPort

func (Options) WithLogfile

func (o Options) WithLogfile(logfile string) Options

WithLogfile sets logfile

func (Options) WithMTLs

func (o Options) WithMTLs(MTLs bool) Options

WithMTLs sets MTLs

func (Options) WithMTLsOptions

func (o Options) WithMTLsOptions(MTLsOptions client.MTLsOptions) Options

WithMTLsOptions sets MTLsOptions

func (Options) WithPidfile

func (o Options) WithPidfile(pidfile string) Options

WithPidfile sets pidfile

func (Options) WithPort

func (o Options) WithPort(port int) Options

WithPort sets port

type SafeReferenceHandler

type SafeReferenceHandler interface {
	SafeReference(w http.ResponseWriter, req *http.Request, pathParams map[string]string)
}

func NewSafeReferenceHandler

func NewSafeReferenceHandler(mux *runtime.ServeMux, client client.ImmuClient) SafeReferenceHandler

type SafeZAddHandler

type SafeZAddHandler interface {
	SafeZAdd(w http.ResponseWriter, req *http.Request, pathParams map[string]string)
}

func NewSafeZAddHandler

func NewSafeZAddHandler(mux *runtime.ServeMux, client client.ImmuClient) SafeZAddHandler

type SafegetHandler

type SafegetHandler interface {
	Safeget(w http.ResponseWriter, req *http.Request, pathParams map[string]string)
}

func NewSafegetHandler

func NewSafegetHandler(mux *runtime.ServeMux, client client.ImmuClient) SafegetHandler

type SafesetHandler

type SafesetHandler interface {
	Safeset(w http.ResponseWriter, req *http.Request, pathParams map[string]string)
}

func NewSafesetHandler

func NewSafesetHandler(mux *runtime.ServeMux, client client.ImmuClient) SafesetHandler

type Service

type Service struct {
	ImmuGwServer
}

func (Service) Run

func (s Service) Run()

Run - blocking run service

func (Service) Start

func (s Service) Start()

Start - non-blocking start service

func (Service) Stop

func (s Service) Stop()

Stop - non-blocking stop service

type SetHandler

type SetHandler interface {
	Set(w http.ResponseWriter, req *http.Request, pathParams map[string]string)
}

func NewSetHandler

func NewSetHandler(mux *runtime.ServeMux, client client.ImmuClient) SetHandler

Jump to

Keyboard shortcuts

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