Documentation ¶
Index ¶
- Variables
- type AuthenticationToken
- type CountryCode
- type Device
- func (p *Device) Equals(other *Device) bool
- func (p *Device) GetID() string
- func (p *Device) Read(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Device) ReadField1(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Device) String() string
- func (p *Device) Write(ctx context.Context, oprot thrift.TProtocol) error
- type Geolocation
- func (p *Geolocation) Equals(other *Geolocation) bool
- func (p *Geolocation) GetCountryCode() CountryCode
- func (p *Geolocation) Read(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Geolocation) ReadField1(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Geolocation) String() string
- func (p *Geolocation) Write(ctx context.Context, oprot thrift.TProtocol) error
- type Locale
- func (p *Locale) Equals(other *Locale) bool
- func (p *Locale) GetLocaleCode() LocaleCode
- func (p *Locale) Read(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Locale) ReadField1(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Locale) String() string
- func (p *Locale) Write(ctx context.Context, oprot thrift.TProtocol) error
- type LocaleCode
- type Loid
- func (p *Loid) Equals(other *Loid) bool
- func (p *Loid) GetCreatedMs() int64
- func (p *Loid) GetID() string
- func (p *Loid) Read(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Loid) ReadField1(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Loid) ReadField2(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Loid) String() string
- func (p *Loid) Write(ctx context.Context, oprot thrift.TProtocol) error
- type OriginService
- func (p *OriginService) Equals(other *OriginService) bool
- func (p *OriginService) GetName() string
- func (p *OriginService) Read(ctx context.Context, iprot thrift.TProtocol) error
- func (p *OriginService) ReadField1(ctx context.Context, iprot thrift.TProtocol) error
- func (p *OriginService) String() string
- func (p *OriginService) Write(ctx context.Context, oprot thrift.TProtocol) error
- type Request
- func (p *Request) Equals(other *Request) bool
- func (p *Request) GetAuthenticationToken() AuthenticationToken
- func (p *Request) GetDevice() *Device
- func (p *Request) GetGeolocation() *Geolocation
- func (p *Request) GetLocale() *Locale
- func (p *Request) GetLoid() *Loid
- func (p *Request) GetOriginService() *OriginService
- func (p *Request) GetRequestID() *RequestId
- func (p *Request) GetSession() *Session
- func (p *Request) IsSetDevice() bool
- func (p *Request) IsSetGeolocation() bool
- func (p *Request) IsSetLocale() bool
- func (p *Request) IsSetLoid() bool
- func (p *Request) IsSetOriginService() bool
- func (p *Request) IsSetRequestID() bool
- func (p *Request) IsSetSession() bool
- func (p *Request) Read(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Request) ReadField1(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Request) ReadField2(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Request) ReadField3(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Request) ReadField4(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Request) ReadField5(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Request) ReadField6(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Request) ReadField7(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Request) ReadField8(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Request) String() string
- func (p *Request) Write(ctx context.Context, oprot thrift.TProtocol) error
- type RequestId
- func (p *RequestId) Equals(other *RequestId) bool
- func (p *RequestId) GetReadableID() string
- func (p *RequestId) Read(ctx context.Context, iprot thrift.TProtocol) error
- func (p *RequestId) ReadField1(ctx context.Context, iprot thrift.TProtocol) error
- func (p *RequestId) String() string
- func (p *RequestId) Write(ctx context.Context, oprot thrift.TProtocol) error
- type Session
- func (p *Session) Equals(other *Session) bool
- func (p *Session) GetID() string
- func (p *Session) Read(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Session) ReadField1(ctx context.Context, iprot thrift.TProtocol) error
- func (p *Session) String() string
- func (p *Session) Write(ctx context.Context, oprot thrift.TProtocol) error
Constants ¶
This section is empty.
Variables ¶
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 (*Device) ReadField1 ¶
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) ReadField1 ¶
func (*Geolocation) String ¶
func (p *Geolocation) String() string
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 (*Locale) GetLocaleCode ¶ added in v1.6.0
func (p *Locale) GetLocaleCode() LocaleCode
func (*Locale) ReadField1 ¶ added in v1.6.0
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 (*Loid) GetCreatedMs ¶
func (*Loid) ReadField1 ¶
func (*Loid) ReadField2 ¶
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) ReadField1 ¶
func (*OriginService) String ¶
func (p *OriginService) String() string
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) GetAuthenticationToken ¶
func (p *Request) GetAuthenticationToken() AuthenticationToken
func (*Request) GetGeolocation ¶
func (p *Request) GetGeolocation() *Geolocation
func (*Request) GetOriginService ¶
func (p *Request) GetOriginService() *OriginService
func (*Request) GetRequestID ¶ added in v1.0.2
func (*Request) GetSession ¶
func (*Request) IsSetDevice ¶
func (*Request) IsSetGeolocation ¶
func (*Request) IsSetLocale ¶ added in v1.6.0
func (*Request) IsSetOriginService ¶
func (*Request) IsSetRequestID ¶ added in v1.0.2
func (*Request) IsSetSession ¶
func (*Request) ReadField1 ¶
func (*Request) ReadField2 ¶
func (*Request) ReadField3 ¶
func (*Request) ReadField4 ¶
func (*Request) ReadField5 ¶
func (*Request) ReadField6 ¶
func (*Request) ReadField7 ¶ added in v1.0.2
func (*Request) ReadField8 ¶ added in v1.6.0
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) GetReadableID ¶ added in v1.0.2
func (*RequestId) ReadField1 ¶ added in v1.0.2
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