code.vegaprotocol.io/vega@v0.79.0/core/coreapi/config.go (about)

     1  // Copyright (C) 2023 Gobalsky Labs Limited
     2  //
     3  // This program is free software: you can redistribute it and/or modify
     4  // it under the terms of the GNU Affero General Public License as
     5  // published by the Free Software Foundation, either version 3 of the
     6  // License, or (at your option) any later version.
     7  //
     8  // This program is distributed in the hope that it will be useful,
     9  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    10  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    11  // GNU Affero General Public License for more details.
    12  //
    13  // You should have received a copy of the GNU Affero General Public License
    14  // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    15  
    16  package coreapi
    17  
    18  import (
    19  	"code.vegaprotocol.io/vega/libs/config/encoding"
    20  	"code.vegaprotocol.io/vega/logging"
    21  )
    22  
    23  const (
    24  	namedLogger = "coreapi"
    25  )
    26  
    27  type Config struct {
    28  	LogLevel          encoding.LogLevel
    29  	Accounts          bool
    30  	Assets            bool
    31  	NetworkParameters bool
    32  	NetworkLimits     bool
    33  	Parties           bool
    34  	Validators        bool
    35  	Proposals         bool
    36  	Markets           bool
    37  	Votes             bool
    38  	MarketsData       bool
    39  	PartiesStake      bool
    40  	Delegations       bool
    41  }
    42  
    43  func NewDefaultConfig() Config {
    44  	return Config{
    45  		LogLevel:          encoding.LogLevel{Level: logging.InfoLevel},
    46  		Accounts:          true,
    47  		Assets:            true,
    48  		NetworkParameters: true,
    49  		NetworkLimits:     true,
    50  		Parties:           true,
    51  		Validators:        true,
    52  		Markets:           true,
    53  		Proposals:         true,
    54  		Votes:             true,
    55  		MarketsData:       true,
    56  		PartiesStake:      true,
    57  		Delegations:       true,
    58  	}
    59  }