Documentation ¶
Index ¶
Constants ¶
View Source
const ( PortEnvironmentVariable = "PORT" MetricsPortEnvironmentVariable = "METRICS_PORT" UserDataEnvironmentVariable = "USER_DATA" GrpcUrlEnvironmentVariable = "GRPC_URL" LavaChainIDEnvironmentVariable = "CHAIN_ID" DefaultGeolocationEnvironmentVariable = "DEFAULT_GEOLOCATION" CountriesFilePathEnvironmentVariable = "COUNTRIES_FILE_PATH" IpFilePathEnvironmentVariable = "IP_FILE_PATH" )
View Source
const DefaultProjectId = "default"
View Source
const RefererHeaderKey = "Referer"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BadgeStateTracker ¶
type BadgeStateTracker struct { *statetracker.StateTracker // contains filtered or unexported fields }
func NewBadgeStateTracker ¶
func NewBadgeStateTracker(ctx context.Context, clientCtx cosmosclient.Context, chainFetcher chaintracker.ChainFetcher, chainId string) (ret *BadgeStateTracker, err error)
func (*BadgeStateTracker) RegisterForEpochUpdates ¶
func (st *BadgeStateTracker) RegisterForEpochUpdates(ctx context.Context, epochUpdatable statetracker.EpochUpdatable)
type HealthServer ¶
type HealthServer struct {
health.UnimplementedHealthServer
}
func (*HealthServer) Check ¶
func (s *HealthServer) Check(ctx context.Context, in *health.HealthCheckRequest) (*health.HealthCheckResponse, error)
func (*HealthServer) Watch ¶
func (s *HealthServer) Watch(in *health.HealthCheckRequest, _ health.Health_WatchServer) error
type IpService ¶
type IpService struct { DefaultGeolocation int CountryCsvFilePath string IpTsvFilePath string IpCountryData *[]*IpData }
func InitIpService ¶
func (*IpService) ReadIpTsvFileData ¶
type MetricsService ¶
type MetricsService struct { TotalRequests prometheus.Counter FailedRequests prometheus.Counter SuccessfulRequests prometheus.Counter }
func InitMetrics ¶
func InitMetrics() *MetricsService
func (*MetricsService) AddRequest ¶
func (service *MetricsService) AddRequest(isSuccessful bool)
type ProjectConfiguration ¶
type Server ¶
type Server struct { pairingtypes.UnimplementedBadgeGeneratorServer ProjectsConfiguration map[string]map[string]*ProjectConfiguration // geolocation/project_id/project_data ChainId string IpService *IpService // contains filtered or unexported fields }
func (*Server) GenerateBadge ¶
func (s *Server) GenerateBadge(ctx context.Context, req *pairingtypes.GenerateBadgeRequest) (*pairingtypes.GenerateBadgeResponse, error)
func (*Server) UpdateEpoch ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.