gameProtect

package
v1.0.149 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServiceInfoMap = map[string]*base.ServiceInfo{
		base.RegionCnNorth1: {
			Timeout: 5 * time.Second,
			Host:    "open.volcengineapi.com",
			Header: http.Header{
				"Accept": []string{"application/json"},
			},
			Credentials: base.Credentials{Region: base.RegionCnNorth1, Service: "game_protect"},
		},
		base.RegionApSingapore: {
			Timeout: 5 * time.Second,
			Host:    "open-ap-singapore-1.volcengineapi.com",
			Header: http.Header{
				"Accept": []string{"application/json"},
			},
			Credentials: base.Credentials{Region: base.RegionApSingapore, Service: "game_protect"},
		},
		base.RegionUsEast1: {
			Timeout: 5 * time.Second,
			Host:    "open-us-east-1.volcengineapi.com",
			Header: http.Header{
				"Accept": []string{"application/json"},
			},
			Credentials: base.Credentials{Region: base.RegionUsEast1, Service: "game_protect"},
		},
	}

	ApiInfoList = map[string]*base.ApiInfo{
		"RiskResult": {
			Method: http.MethodGet,
			Path:   "/",
			Query: url.Values{
				"Action":  []string{"RiskResult"},
				"Version": []string{"2021-04-25"},
			},
		},
	}
)
View Source
var DefaultInstance = NewInstance()

Functions

func ToUrlValues

func ToUrlValues(i interface{}) (values url.Values)

func UnmarshalResultInto

func UnmarshalResultInto(data []byte, result interface{}) error

Types

type GameProtector

type GameProtector struct {
	*base.Client
	// contains filtered or unexported fields
}

func NewInstance

func NewInstance() *GameProtector

func (*GameProtector) CloseRetry

func (p *GameProtector) CloseRetry()

func (*GameProtector) Retry

func (p *GameProtector) Retry() bool

func (*GameProtector) RiskResult

func (p *GameProtector) RiskResult(req *RiskResultRequest) (*RiskResultResponse, error)

func (*GameProtector) SetRegion

func (p *GameProtector) SetRegion(region string) error

type Page

type Page struct {
	PageNum  int64 `json:"PageNum" form:"PageNum"`
	PageSize int64 `json:"PageSize" form:"PageSize"`
	Total    int64 `json:"Total" form:"Total"` // used when return page information in response, no need when request
}

type RiskResultRequest

type RiskResultRequest struct {
	AppId     int64  `json:"AppId" form:"AppId"`
	Service   string `json:"Service" form:"Service"`
	StartTime int64  `json:"StartTime" form:"StartTime"`
	EndTime   int64  `json:"EndTime" form:"EndTime"`
	Page
}

func (*RiskResultRequest) ToQuery

func (r *RiskResultRequest) ToQuery() url.Values

type RiskResultResponse

type RiskResultResponse struct {
	RequestId string                   `json:"RequestId"`
	Code      int                      `json:"Code"`
	Message   string                   `json:"Message"`
	Data      []map[string]interface{} `json:"Data"`
	Page      Page                     `json:"page"`
}

Jump to

Keyboard shortcuts

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