common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CtxKeyTraceID is the key for the TraceId value in contexts
	CtxKeyTraceID = "TraceId"

	// HeaderTraceID is the trace ID header.
	HeaderTraceID = "X-Trace-Id"

	// HeaderContentType is content type header.
	HeaderContentType = "Content-Type"

	// HeaderAuthorization is the value of the authorization header.
	HeaderAuthorization = "Authorization"

	// HeaderValueContentTypeJSON represents the value for this content type
	HeaderValueContentTypeJSON = "application/json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MeasureAPIRequest

type MeasureAPIRequest struct {
	Rows []PropertyQuery `json:"rows"`
}

MeasureAPIRequest is the incoming request struct

type PropertyQuery

type PropertyQuery struct {
	Channel     string `json:"channel"`
	Country     string `json:"country"`
	Impressions int    `json:"impressions"`
	InventoryID string `json:"inventoryId"`
	UtcDateTime string `json:"utcDatetime"`
	Weight      int    `json:"weight"`
}

PropertyQuery is the format that the scope 3 api expects for this endpoint

func (PropertyQuery) IndexName

func (p PropertyQuery) IndexName() string

type PropertyResponse

type PropertyResponse struct {
	PropertyName   string `json:"propertyName,omitempty"`
	UtcDateTime    string `json:"utcDateTime,omitempty"`
	TotalEmissions string `json:"totalEmissions"`
	Weight         int    `json:"weight,omitempty"`
}

PropertyResponse is a custom type defined for moving data around here

func (PropertyResponse) IndexName

func (p PropertyResponse) IndexName() string

Jump to

Keyboard shortcuts

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