edgecontext

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoUnusedProtection__ int

Functions

This section is empty.

Types

type AuthenticationToken

type AuthenticationToken string

A raw authentication token as returned by the authentication service.

func AuthenticationTokenPtr

func AuthenticationTokenPtr(v AuthenticationToken) *AuthenticationToken

type CountryCode

type CountryCode string

A two-character ISO 3166-1 country code representing the current geographic location of the client.

func CountryCodePtr

func CountryCodePtr(v CountryCode) *CountryCode

type Device

type Device struct {
	ID string `thrift:"id,1" db:"id" json:"id"`
}

The components of the device making a request to our services that we want to propogate between services.

This model is a component of the "Edge-Request" header. You should not need to interact with this model directly, but rather through the EdgeRequestContext interface provided by baseplate.

Attributes:

  • ID: The ID of the device.
var Request_Device_DEFAULT *Device

func NewDevice

func NewDevice() *Device

func (*Device) Equals

func (p *Device) Equals(other *Device) bool

func (*Device) GetID

func (p *Device) GetID() string

func (*Device) Read

func (p *Device) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*Device) ReadField1

func (p *Device) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*Device) String

func (p *Device) String() string

func (*Device) Write

func (p *Device) Write(ctx context.Context, oprot thrift.TProtocol) error

type Geolocation

type Geolocation struct {
	CountryCode CountryCode `thrift:"country_code,1" db:"country_code" json:"country_code"`
}

Geolocation data from a request to our services that we want to propagate between services.

This model is a component of the "Edge-Request" header. You should not need to interact with this model directly, but rather through the EdgeRequestContext interface provided by baseplate.

Attributes:

  • CountryCode: The country code of the requesting client based on geographic location.
var Request_Geolocation_DEFAULT *Geolocation

func NewGeolocation

func NewGeolocation() *Geolocation

func (*Geolocation) Equals

func (p *Geolocation) Equals(other *Geolocation) bool

func (*Geolocation) GetCountryCode

func (p *Geolocation) GetCountryCode() CountryCode

func (*Geolocation) Read

func (p *Geolocation) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*Geolocation) ReadField1

func (p *Geolocation) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*Geolocation) String

func (p *Geolocation) String() string

func (*Geolocation) Write

func (p *Geolocation) Write(ctx context.Context, oprot thrift.TProtocol) error

type Locale added in v1.6.0

type Locale struct {
	LocaleCode LocaleCode `thrift:"locale_code,1" db:"locale_code" json:"locale_code"`
}

Locale data from a request to our services that we want to propagate between services.

This model is a component of the "Edge-Request" header. You should not need to interact with this model directly, but rather through the EdgeRequestContext interface provided by baseplate.

Attributes:

  • LocaleCode: IETF language code representing the client locale preferences.

Preferably in BCP-47 format ({lang} or {lang}-{region}), but underscore separated locales also valid ({lang}_{region})

var Request_Locale_DEFAULT *Locale

func NewLocale added in v1.6.0

func NewLocale() *Locale

func (*Locale) Equals added in v1.6.0

func (p *Locale) Equals(other *Locale) bool

func (*Locale) GetLocaleCode added in v1.6.0

func (p *Locale) GetLocaleCode() LocaleCode

func (*Locale) Read added in v1.6.0

func (p *Locale) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*Locale) ReadField1 added in v1.6.0

func (p *Locale) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*Locale) String added in v1.6.0

func (p *Locale) String() string

func (*Locale) Write added in v1.6.0

func (p *Locale) Write(ctx context.Context, oprot thrift.TProtocol) error

type LocaleCode added in v1.6.0

type LocaleCode string

IETF language tag representing the preferred locale for the client, used for providing localized content. Consists of an ISO 639-1 primary language subtag and an optional ISO 3166-1 alpha-2 region subtag.

func LocaleCodePtr added in v1.6.0

func LocaleCodePtr(v LocaleCode) *LocaleCode

type Loid

type Loid struct {
	ID        string `thrift:"id,1" db:"id" json:"id"`
	CreatedMs int64  `thrift:"created_ms,2" db:"created_ms" json:"created_ms"`
}

The components of the Reddit LoID cookie that we want to propagate between services.

This model is a component of the "Edge-Request" header. You should not need to interact with this model directly, but rather through the EdgeRequestContext interface provided by baseplate.

Attributes:

  • ID: The ID of the LoID cookie.

  • CreatedMs: The time when the LoID cookie was created in epoch milliseconds.

var Request_Loid_DEFAULT *Loid

func NewLoid

func NewLoid() *Loid

func (*Loid) Equals

func (p *Loid) Equals(other *Loid) bool

func (*Loid) GetCreatedMs

func (p *Loid) GetCreatedMs() int64

func (*Loid) GetID

func (p *Loid) GetID() string

func (*Loid) Read

func (p *Loid) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*Loid) ReadField1

func (p *Loid) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*Loid) ReadField2

func (p *Loid) ReadField2(ctx context.Context, iprot thrift.TProtocol) error

func (*Loid) String

func (p *Loid) String() string

func (*Loid) Write

func (p *Loid) Write(ctx context.Context, oprot thrift.TProtocol) error

type OriginService

type OriginService struct {
	Name string `thrift:"name,1" db:"name" json:"name"`
}

Metadata about the origin service for a request.

The "origin" service is the service responsible for handling the request from the client.

This model is a component of the "Edge-Request" header. You should not need to interact with this model directly, but rather through the EdgeRequestContext interface provided by baseplate.

Attributes:

  • Name: The name of the origin service.
var Request_OriginService_DEFAULT *OriginService

func NewOriginService

func NewOriginService() *OriginService

func (*OriginService) Equals

func (p *OriginService) Equals(other *OriginService) bool

func (*OriginService) GetName

func (p *OriginService) GetName() string

func (*OriginService) Read

func (p *OriginService) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*OriginService) ReadField1

func (p *OriginService) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*OriginService) String

func (p *OriginService) String() string

func (*OriginService) Write

func (p *OriginService) Write(ctx context.Context, oprot thrift.TProtocol) error

type Request

type Request struct {
	Loid                *Loid               `thrift:"loid,1" db:"loid" json:"loid"`
	Session             *Session            `thrift:"session,2" db:"session" json:"session"`
	AuthenticationToken AuthenticationToken `thrift:"authentication_token,3" db:"authentication_token" json:"authentication_token"`
	Device              *Device             `thrift:"device,4" db:"device" json:"device"`
	OriginService       *OriginService      `thrift:"origin_service,5" db:"origin_service" json:"origin_service"`
	Geolocation         *Geolocation        `thrift:"geolocation,6" db:"geolocation" json:"geolocation"`
	RequestID           *RequestId          `thrift:"request_id,7" db:"request_id" json:"request_id,omitempty"`
	Locale              *Locale             `thrift:"locale,8" db:"locale" json:"locale,omitempty"`
}

Container model for the Edge-Request context header.

Baseplate will automatically parse this from the "Edge-Request" header and provides an interface that wraps this Thrift model. You should not need to interact with this model directly, but rather through the EdgeRequestContext interface provided by baseplate.

Attributes:

  • Loid
  • Session
  • AuthenticationToken
  • Device
  • OriginService
  • Geolocation
  • RequestID
  • Locale

func NewRequest

func NewRequest() *Request

func (*Request) Equals

func (p *Request) Equals(other *Request) bool

func (*Request) GetAuthenticationToken

func (p *Request) GetAuthenticationToken() AuthenticationToken

func (*Request) GetDevice

func (p *Request) GetDevice() *Device

func (*Request) GetGeolocation

func (p *Request) GetGeolocation() *Geolocation

func (*Request) GetLocale added in v1.6.0

func (p *Request) GetLocale() *Locale

func (*Request) GetLoid

func (p *Request) GetLoid() *Loid

func (*Request) GetOriginService

func (p *Request) GetOriginService() *OriginService

func (*Request) GetRequestID added in v1.0.2

func (p *Request) GetRequestID() *RequestId

func (*Request) GetSession

func (p *Request) GetSession() *Session

func (*Request) IsSetDevice

func (p *Request) IsSetDevice() bool

func (*Request) IsSetGeolocation

func (p *Request) IsSetGeolocation() bool

func (*Request) IsSetLocale added in v1.6.0

func (p *Request) IsSetLocale() bool

func (*Request) IsSetLoid

func (p *Request) IsSetLoid() bool

func (*Request) IsSetOriginService

func (p *Request) IsSetOriginService() bool

func (*Request) IsSetRequestID added in v1.0.2

func (p *Request) IsSetRequestID() bool

func (*Request) IsSetSession

func (p *Request) IsSetSession() bool

func (*Request) Read

func (p *Request) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*Request) ReadField1

func (p *Request) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*Request) ReadField2

func (p *Request) ReadField2(ctx context.Context, iprot thrift.TProtocol) error

func (*Request) ReadField3

func (p *Request) ReadField3(ctx context.Context, iprot thrift.TProtocol) error

func (*Request) ReadField4

func (p *Request) ReadField4(ctx context.Context, iprot thrift.TProtocol) error

func (*Request) ReadField5

func (p *Request) ReadField5(ctx context.Context, iprot thrift.TProtocol) error

func (*Request) ReadField6

func (p *Request) ReadField6(ctx context.Context, iprot thrift.TProtocol) error

func (*Request) ReadField7 added in v1.0.2

func (p *Request) ReadField7(ctx context.Context, iprot thrift.TProtocol) error

func (*Request) ReadField8 added in v1.6.0

func (p *Request) ReadField8(ctx context.Context, iprot thrift.TProtocol) error

func (*Request) String

func (p *Request) String() string

func (*Request) Write

func (p *Request) Write(ctx context.Context, oprot thrift.TProtocol) error

type RequestId added in v1.0.2

type RequestId struct {
	ReadableID string `thrift:"readable_id,1" db:"readable_id" json:"readable_id"`
}

Unique identifier of this Edge Request

This model is a component of the "Edge-Request" header. You should not need to interact with this model directly, but rather through the EdgeRequestContext interface provided by baseplate.

Attributes:

  • ReadableID: The id of this Edge Request, in the most human-readable format.
var Request_RequestID_DEFAULT *RequestId

func NewRequestId added in v1.0.2

func NewRequestId() *RequestId

func (*RequestId) Equals added in v1.0.2

func (p *RequestId) Equals(other *RequestId) bool

func (*RequestId) GetReadableID added in v1.0.2

func (p *RequestId) GetReadableID() string

func (*RequestId) Read added in v1.0.2

func (p *RequestId) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*RequestId) ReadField1 added in v1.0.2

func (p *RequestId) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*RequestId) String added in v1.0.2

func (p *RequestId) String() string

func (*RequestId) Write added in v1.0.2

func (p *RequestId) Write(ctx context.Context, oprot thrift.TProtocol) error

type Session

type Session struct {
	ID string `thrift:"id,1" db:"id" json:"id"`
}

The components of the Reddit Session tracker cookie that we want to propagate between services.

This model is a component of the "Edge-Request" header. You should not need to interact with this model directly, but rather through the EdgeRequestContext interface provided by baseplate.

Attributes:

  • ID: The ID of the Session tracker cookie.
var Request_Session_DEFAULT *Session

func NewSession

func NewSession() *Session

func (*Session) Equals

func (p *Session) Equals(other *Session) bool

func (*Session) GetID

func (p *Session) GetID() string

func (*Session) Read

func (p *Session) Read(ctx context.Context, iprot thrift.TProtocol) error

func (*Session) ReadField1

func (p *Session) ReadField1(ctx context.Context, iprot thrift.TProtocol) error

func (*Session) String

func (p *Session) String() string

func (*Session) Write

func (p *Session) Write(ctx context.Context, oprot thrift.TProtocol) error

Jump to

Keyboard shortcuts

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