explorer

package
v0.0.0-...-bc1f52c Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 44 Imported by: 0

Documentation

Overview

https://www.blockchain-altcoin.com/global-id

https://www.blockchain-altcoin.com/privacy-policy

https://www.blockchain-altcoin.com/terms-of-service

Index

Constants

View Source
const (
	// XRequestIDHeaderKey represent the label of X request ID header.
	XRequestIDHeaderKey = "X-Request-ID"
	// XRequestIDHeaderKey represent the label of request ID header.
	RequestIDHeader = "RequestID"
)

Variables

This section is empty.

Functions

func WithAuth

func WithAuth(a *auth.Auth) func(*Explorer)

func WithConfig

func WithConfig(cfg *config.Config) func(*Explorer)

func WithLocales

func WithLocales(cfg config.Locales) func(*Explorer)

func WithLogs

func WithLogs(logs *zap.Logger) func(*Explorer)

func WithMetadata

func WithMetadata(metadata config.Metadata) func(*Explorer)

func WithMetrics

func WithMetrics(m *metrics.Metrics) func(*Explorer)

func WithModel

func WithModel(evt *model.Model) func(*Explorer)

func WithRecaptcha

func WithRecaptcha(cfg config.ReCaptcha, log *zap.Logger) func(*Explorer)

func WithWebSockets

func WithWebSockets() func(*Explorer)

Types

type BodyReceived

type BodyReceived interface{}

type Error

type Error struct {
	Status    int
	Error     error
	PageTitle string
}

type ErrorResponse

type ErrorResponse struct {
	// The status code
	Code int `json:"code"`
	// The error message
	Message string `json:"message"`
}

ErrorResponse structure of error response.

type Explorer

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

func New

func New(options ...func(*Explorer)) *Explorer

func (*Explorer) ExecuteTemplate

func (e *Explorer) ExecuteTemplate(rw http.ResponseWriter, r *http.Request, name string, data interface{})

func (*Explorer) JSON

func (e *Explorer) JSON(rw http.ResponseWriter, resp interface{})

func (*Explorer) JSONfail

func (e *Explorer) JSONfail(err error, w http.ResponseWriter)

fail Respond error to json format.

func (*Explorer) PProf

func (e *Explorer) PProf(mux *http.ServeMux)

func (*Explorer) Shutdown

func (e *Explorer) Shutdown(ctx context.Context)

func (*Explorer) Start

func (e *Explorer) Start(stop chan error)

func (*Explorer) StartMetricsServer

func (e *Explorer) StartMetricsServer(stop chan error)

type FrontData

type FrontData struct {
	PageTitle         string
	Authentified      bool
	Menus             []Menus
	Javascripts       []string
	ModuleJavascripts []string
	CSS               []string
	// contains filtered or unexported fields
}

func (*FrontData) Css

func (f *FrontData) Css(css []string) *FrontData

func (*FrontData) JS

func (f *FrontData) JS(js []string) *FrontData

func (*FrontData) ModuleJS

func (f *FrontData) ModuleJS(js []string) *FrontData

func (*FrontData) Title

func (f *FrontData) Title(title string) *FrontData

type GenericError

type GenericError struct {
	// in: body
	Body ErrorResponse `json:"body"`
}

GenericError Default response when we have an error.

swagger:response genericError nolint

type Healthz

type Healthz struct {
	Result   bool     `json:"result"`
	Messages []string `json:"messages"`
	Version  string   `json:"version"`
}
type Menus struct {
	Identifier  string
	Name        string
	Title       string
	URL         string
	HasChildren bool
	Pre         string
}

type State

type State struct {
	State   int
	Message string
}

type UnspTxOutput

type UnspTxOutput struct {
	TxId   string `json:"transactionId"`
	Index  uint   `json:"index"`
	Amount uint   `json:"amount"`
}

Jump to

Keyboard shortcuts

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