yalogapi

package
v0.0.0-...-83898e6 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiRequest

type ApiRequest struct {
	Requests []UserRequest
}

type Config

type Config struct {
	StartDate  string
	EndDate    string
	Mode       string
	Source     string
	Clickhouse *clickhouse.Config `mapstructure:"clickhouse"`
	Logsapi    *logsapi.Config    `mapstructure:"logsapi"`
	Types      *Types
}

func NewYalogapiConfig

func NewYalogapiConfig() (*Config, error)

func (*Config) Init

func (config *Config) Init()

func (Config) Validate

func (config Config) Validate() error

type CreateTaskResponse

type CreateTaskResponse struct {
	TaskLog TaskLog `json:"log_request"`
}

type EvaluateResponse

type EvaluateResponse struct {
	LogRequestEvaluation LogRequestEvaluation `json:"log_request_evaluation"`
}

type GetStatusResponse

type GetStatusResponse struct {
	TaskStatus TaskStatus `json:"log_request"`
}

type LogPart

type LogPart struct {
	PartNumber int `json:"part_number"`
	Size       int `json:"size"`
}

type LogRequestEvaluation

type LogRequestEvaluation struct {
	Possible               bool `json:"possible"`
	MaxPossibleDayQuantity int  `json:"max_possible_day_quantity"`
}

type Requests

type Requests []UserRequest

type TaskLog

type TaskLog struct {
	RequestID int    `json:"request_id"`
	CounterID int    `json:"counter_id"`
	Status    string `json:"status"`
}

type TaskStatus

type TaskStatus struct {
	Status string `json:"status"`
	Parts  []LogPart
}

type TypeItem

type TypeItem struct {
	Name  string `mapstructure:"name"`
	Value string `mapstructure:"value"`
}

type Types

type Types struct {
	Items []*TypeItem `mapstructure:"items"`
}

func (*Types) Build

func (types *Types) Build(fields []string) map[string]string

type UserRequest

type UserRequest struct {
	Token      string
	CounterID  string
	StartDate  string
	EndDate    string
	Source     string
	Fields     []string
	RequestID  int
	TaskStatus TaskStatus
}

func NewUserRequest

func NewUserRequest(config *Config) UserRequest

NewUserRequest create UserRequest

type YaLogApi

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

func NewYaLogApi

func NewYaLogApi(config *Config) *YaLogApi

NewYaLogApi create YaLogApi

func (*YaLogApi) Run

func (yalogapi *YaLogApi) Run()

Jump to

Keyboard shortcuts

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