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 ¶
- Variables
- type HistoryHandler
- type ImmuGwServer
- type Options
- func (o Options) Bind() string
- func (o Options) String() string
- func (o Options) WithAddress(address string) Options
- func (o Options) WithConfig(config string) Options
- func (o Options) WithDetached(detached bool) Options
- func (o Options) WithDir(dir string) Options
- func (o Options) WithImmudbAddress(immudbAddress string) Options
- func (o Options) WithImmudbPort(immudbPort int) Options
- func (o Options) WithLogfile(logfile string) Options
- func (o Options) WithMTLs(MTLs bool) Options
- func (o Options) WithMTLsOptions(MTLsOptions client.MTLsOptions) Options
- func (o Options) WithPidfile(pidfile string) Options
- func (o Options) WithPort(port int) Options
- type SafeReferenceHandler
- type SafeZAddHandler
- type SafegetHandler
- type SafesetHandler
- type Service
- type SetHandler
Constants ¶
This section is empty.
Variables ¶
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) WithAddress ¶
WithAddress sets address
func (Options) WithConfig ¶
WithConfig sets config
func (Options) WithDetached ¶
WithDetached sets immugw to be run in background
func (Options) WithImmudbAddress ¶
WithImmudbAddress sets immudbAddress
func (Options) WithImmudbPort ¶
WithImmudbPort sets immudbPort
func (Options) WithLogfile ¶
WithLogfile sets logfile
func (Options) WithMTLsOptions ¶
func (o Options) WithMTLsOptions(MTLsOptions client.MTLsOptions) Options
WithMTLsOptions sets MTLsOptions
func (Options) WithPidfile ¶
WithPidfile sets pidfile
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
}
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