Documentation ¶
Index ¶
- Variables
- type AuthenticationToken
- type BaseplateService
- type BaseplateServiceClient
- func NewBaseplateServiceClient(c thrift.TClient) *BaseplateServiceClient
- func NewBaseplateServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *BaseplateServiceClient
- func NewBaseplateServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *BaseplateServiceClient
- type BaseplateServiceIsHealthyArgs
- type BaseplateServiceIsHealthyResult
- func (p *BaseplateServiceIsHealthyResult) GetSuccess() bool
- func (p *BaseplateServiceIsHealthyResult) IsSetSuccess() bool
- func (p *BaseplateServiceIsHealthyResult) Read(iprot thrift.TProtocol) error
- func (p *BaseplateServiceIsHealthyResult) ReadField0(iprot thrift.TProtocol) error
- func (p *BaseplateServiceIsHealthyResult) String() string
- func (p *BaseplateServiceIsHealthyResult) Write(oprot thrift.TProtocol) error
- type BaseplateServiceProcessor
- func (p *BaseplateServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)
- func (p *BaseplateServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)
- func (p *BaseplateServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)
- func (p *BaseplateServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction
- type Device
- type Loid
- func (p *Loid) GetCreatedMs() int64
- func (p *Loid) GetID() string
- func (p *Loid) Read(iprot thrift.TProtocol) error
- func (p *Loid) ReadField1(iprot thrift.TProtocol) error
- func (p *Loid) ReadField2(iprot thrift.TProtocol) error
- func (p *Loid) String() string
- func (p *Loid) Write(oprot thrift.TProtocol) error
- type Request
- func (p *Request) GetAuthenticationToken() AuthenticationToken
- func (p *Request) GetDevice() *Device
- func (p *Request) GetLoid() *Loid
- func (p *Request) GetSession() *Session
- func (p *Request) IsSetDevice() bool
- func (p *Request) IsSetLoid() bool
- func (p *Request) IsSetSession() bool
- func (p *Request) Read(iprot thrift.TProtocol) error
- func (p *Request) ReadField1(iprot thrift.TProtocol) error
- func (p *Request) ReadField2(iprot thrift.TProtocol) error
- func (p *Request) ReadField3(iprot thrift.TProtocol) error
- func (p *Request) ReadField4(iprot thrift.TProtocol) error
- func (p *Request) String() string
- func (p *Request) Write(oprot thrift.TProtocol) error
- type Session
Constants ¶
This section is empty.
Variables ¶
var BaseplateServiceIsHealthyResult_Success_DEFAULT bool
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 BaseplateService ¶
type BaseplateService interface { // Return whether or not the service is healthy. // // The healthchecker (baseplate.server.healthcheck) expects this endpoint to // exist so it can determine your service's health. // // This should return True if the service is healthy. If the service is // unhealthy, it can return False or raise an exception. // IsHealthy(ctx context.Context) (r bool, err error) }
type BaseplateServiceClient ¶
type BaseplateServiceClient struct {
// contains filtered or unexported fields
}
The base for any baseplate-based service.
Your service should inherit from this one so that common tools can interact with any expected interfaces.
func NewBaseplateServiceClient ¶
func NewBaseplateServiceClient(c thrift.TClient) *BaseplateServiceClient
func NewBaseplateServiceClientFactory ¶
func NewBaseplateServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *BaseplateServiceClient
func NewBaseplateServiceClientProtocol ¶
func NewBaseplateServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *BaseplateServiceClient
func (*BaseplateServiceClient) Client_ ¶
func (p *BaseplateServiceClient) Client_() thrift.TClient
func (*BaseplateServiceClient) IsHealthy ¶
func (p *BaseplateServiceClient) IsHealthy(ctx context.Context) (r bool, err error)
Return whether or not the service is healthy.
The healthchecker (baseplate.server.healthcheck) expects this endpoint to exist so it can determine your service's health.
This should return True if the service is healthy. If the service is unhealthy, it can return False or raise an exception.
type BaseplateServiceIsHealthyArgs ¶
type BaseplateServiceIsHealthyArgs struct { }
func NewBaseplateServiceIsHealthyArgs ¶
func NewBaseplateServiceIsHealthyArgs() *BaseplateServiceIsHealthyArgs
func (*BaseplateServiceIsHealthyArgs) Read ¶
func (p *BaseplateServiceIsHealthyArgs) Read(iprot thrift.TProtocol) error
func (*BaseplateServiceIsHealthyArgs) String ¶
func (p *BaseplateServiceIsHealthyArgs) String() string
type BaseplateServiceIsHealthyResult ¶
type BaseplateServiceIsHealthyResult struct {
Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"`
}
Attributes:
- Success
func NewBaseplateServiceIsHealthyResult ¶
func NewBaseplateServiceIsHealthyResult() *BaseplateServiceIsHealthyResult
func (*BaseplateServiceIsHealthyResult) GetSuccess ¶
func (p *BaseplateServiceIsHealthyResult) GetSuccess() bool
func (*BaseplateServiceIsHealthyResult) IsSetSuccess ¶
func (p *BaseplateServiceIsHealthyResult) IsSetSuccess() bool
func (*BaseplateServiceIsHealthyResult) Read ¶
func (p *BaseplateServiceIsHealthyResult) Read(iprot thrift.TProtocol) error
func (*BaseplateServiceIsHealthyResult) ReadField0 ¶
func (p *BaseplateServiceIsHealthyResult) ReadField0(iprot thrift.TProtocol) error
func (*BaseplateServiceIsHealthyResult) String ¶
func (p *BaseplateServiceIsHealthyResult) String() string
type BaseplateServiceProcessor ¶
type BaseplateServiceProcessor struct {
// contains filtered or unexported fields
}
func NewBaseplateServiceProcessor ¶
func NewBaseplateServiceProcessor(handler BaseplateService) *BaseplateServiceProcessor
func (*BaseplateServiceProcessor) AddToProcessorMap ¶
func (p *BaseplateServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction)
func (*BaseplateServiceProcessor) GetProcessorFunction ¶
func (p *BaseplateServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool)
func (*BaseplateServiceProcessor) Process ¶
func (p *BaseplateServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException)
func (*BaseplateServiceProcessor) ProcessorMap ¶
func (p *BaseplateServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction
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
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 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 LoID cookie.
CreatedMs: The time when the LoID cookie was created in epoch milliseconds.
var Request_Loid_DEFAULT *Loid
func (*Loid) GetCreatedMs ¶
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"` }
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
func NewRequest ¶
func NewRequest() *Request
func (*Request) GetAuthenticationToken ¶
func (p *Request) GetAuthenticationToken() AuthenticationToken
func (*Request) GetSession ¶
func (*Request) IsSetDevice ¶
func (*Request) IsSetSession ¶
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 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 Session tracker cookie.
var Request_Session_DEFAULT *Session
func NewSession ¶
func NewSession() *Session