Documentation ¶
Index ¶
- Constants
- type APIConfig
- type Config
- type Context
- type ContextOption
- func WithConfigCopy(cfg Config) ContextOption
- func WithLoadErrorDescriptions() ContextOption
- func WithMempool(cfg map[string]ServiceConfig) ContextOption
- func WithRPC(rpcConfig map[string]RPCConfig) ContextOption
- func WithStorage(cfg StorageConfig, appName string, maxPageSize int64) ContextOption
- func WithWaitRPC(rpcConfig map[string]RPCConfig) ContextOption
- type Contexts
- type DatabaseConfig
- type FrontendConfig
- type IndexerConfig
- type OAuthConfig
- type PostgresConfig
- type Profiler
- type RPCConfig
- type SeedConfig
- type SentryConfig
- type ServiceConfig
- type StorageConfig
- type TezosDomainsConfig
- type TzKTConfig
Constants ¶
View Source
const ( EnvironmentVar = "BCD_ENV" EnvironmentDev = "development" EnvironmentProd = "production" EnvironmentBox = "sandbox" EnvironmentTestnets = "testnets" )
Environments
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIConfig ¶
type APIConfig struct { ProjectName string `yaml:"project_name"` Bind string `yaml:"bind"` CorsEnabled bool `yaml:"cors_enabled"` SentryEnabled bool `yaml:"sentry_enabled"` SeedEnabled bool `yaml:"seed_enabled"` Frontend FrontendConfig `yaml:"frontend"` Seed SeedConfig `yaml:"seed"` Networks []string `yaml:"networks"` PageSize uint64 `yaml:"page_size"` Periodic *periodic.Config `yaml:"periodic"` }
APIConfig -
type Config ¶
type Config struct { RPC map[string]RPCConfig `yaml:"rpc"` Services map[string]ServiceConfig `yaml:"services"` Storage StorageConfig `yaml:"storage"` Sentry SentryConfig `yaml:"sentry"` BaseURL string `yaml:"base_url"` Profiler *Profiler `yaml:"profiler"` LogLevel string `yaml:"log_level"` API APIConfig `yaml:"api"` Indexer struct { Networks map[string]IndexerConfig `yaml:"networks"` ProjectName string `yaml:"project_name"` SentryEnabled bool `yaml:"sentry_enabled"` } `yaml:"indexer"` Scripts struct { Networks []string `yaml:"networks"` } `yaml:"scripts"` }
Config -
type Context ¶
type Context struct { Network types.Network RPC noderpc.INode Mempool *mempool.Mempool StorageDB *core.Postgres Config Config TzipSchema string Storage models.GeneralRepository Accounts account.Repository BigMapActions bigmapaction.Repository BigMapDiffs bigmapdiff.Repository Blocks block.Repository Contracts contract.Repository GlobalConstants contract.ConstantRepository Migrations migration.Repository Operations operation.Repository Protocols protocol.Repository Tickets ticket.Repository Domains domains.Repository Scripts contract.ScriptRepository SmartRollups smartrollup.Repository Stats stats.Repository Cache *cache.Cache }
Context -
func NewContext ¶
func NewContext(network types.Network, opts ...ContextOption) *Context
NewContext -
type ContextOption ¶
type ContextOption func(ctx *Context)
ContextOption -
func WithLoadErrorDescriptions ¶
func WithLoadErrorDescriptions() ContextOption
WithLoadErrorDescriptions -
func WithStorage ¶
func WithStorage(cfg StorageConfig, appName string, maxPageSize int64) ContextOption
WithStorage -
type Contexts ¶
Contexts -
func NewContexts ¶
func NewContexts(cfg Config, networks []string, opts ...ContextOption) Contexts
NewContext -
type DatabaseConfig ¶
DatabaseConfig -
type FrontendConfig ¶
type FrontendConfig struct { GaEnabled bool `yaml:"ga_enabled"` MempoolEnabled bool `yaml:"mempool_enabled"` SandboxMode bool `yaml:"sandbox_mode"` RPC map[string]string `yaml:"rpc"` }
FrontendConfig -
type IndexerConfig ¶
type IndexerConfig struct { ReceiverThreads int64 `yaml:"receiver_threads"` Periodic *periodic.Config `yaml:"periodic"` }
IndexerConfig -
type OAuthConfig ¶
type OAuthConfig struct { State string `yaml:"state"` JWT struct { Secret string `yaml:"secret"` RedirectURL string `yaml:"redirect_url"` } `yaml:"jwt"` Github struct { ClientID string `yaml:"client_id"` Secret string `yaml:"secret"` CallbackURL string `yaml:"callback_url"` } `yaml:"github"` Gitlab struct { ClientID string `yaml:"client_id"` Secret string `yaml:"secret"` CallbackURL string `yaml:"callback_url"` } `yaml:"gitlab"` }
OAuthConfig -
type PostgresConfig ¶
type PostgresConfig struct { Host string `yaml:"host"` Port int `yaml:"port"` User string `yaml:"user"` DBName string `yaml:"dbname"` Password string `yaml:"password"` SslMode string `yaml:"sslmode"` }
PostgresConfig -
func (PostgresConfig) ConnectionString ¶
func (p PostgresConfig) ConnectionString() string
ConnectionString -
type RPCConfig ¶
type RPCConfig struct { URI string `yaml:"uri"` Timeout int `yaml:"timeout"` Cache string `yaml:"cache"` RequestsPerSecond int `yaml:"requests_per_second"` Log bool `yaml:"log"` }
RPCConfig -
type SeedConfig ¶
type SeedConfig struct { User struct { Login string `yaml:"login"` Name string `yaml:"name"` AvatarURL string `yaml:"avatar_url"` Token string `yaml:"token"` } `yaml:"user"` Accounts []struct { PrivateKey string `yaml:"private_key"` PublicKeyHash string `yaml:"public_key_hash"` Network string `yaml:"network"` } `yaml:"accounts"` }
SeedConfig -
type SentryConfig ¶
type SentryConfig struct { Environment string `yaml:"environment"` URI string `yaml:"uri"` FrontURI string `yaml:"front_uri"` Debug bool `yaml:"debug"` }
SentryConfig -
type ServiceConfig ¶
type ServiceConfig struct {
MempoolURI string `yaml:"mempool"`
}
ServiceConfig -
type StorageConfig ¶
type StorageConfig struct { Postgres core.Config `yaml:"pg"` Timeout int `yaml:"timeout"` LogQueries bool `yaml:"log_queries,omitempty"` }
StorageConfig -
type TzKTConfig ¶
type TzKTConfig struct { URI string `yaml:"uri"` BaseURI string `yaml:"base_uri"` Timeout int `yaml:"timeout"` }
TzKTConfig -
Click to show internal directories.
Click to hide internal directories.