Documentation
¶
Index ¶
- Variables
- func Decorate(g *geoip2.Reader, r *http.Request, e *Envelope) error
- func ValidateContext(ctx *Context) error
- func ValidateEnvelope(envelope *Envelope) error
- type AccessToken
- type Context
- func (*Context) Descriptor() ([]byte, []int)
- func (m *Context) GetCreatedAtNs() int64
- func (m *Context) GetForeignId() string
- func (m *Context) GetForeignType() string
- func (m *Context) GetProperties() []KV
- func (m *Context) Marshal() (dAtA []byte, err error)
- func (m *Context) MarshalTo(dAtA []byte) (int, error)
- func (m *Context) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Context) ProtoMessage()
- func (m *Context) Reset()
- func (m *Context) Size() (n int)
- func (m *Context) String() string
- func (m *Context) Unmarshal(dAtA []byte) error
- func (m *Context) XXX_DiscardUnknown()
- func (m *Context) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Context) XXX_Merge(src proto.Message)
- func (m *Context) XXX_Size() int
- func (m *Context) XXX_Unmarshal(b []byte) error
- type Envelope
- func (*Envelope) Descriptor() ([]byte, []int)
- func (m *Envelope) GetMetadata() *Metadata
- func (m *Envelope) GetPayload() []byte
- func (m *Envelope) Marshal() (dAtA []byte, err error)
- func (m *Envelope) MarshalTo(dAtA []byte) (int, error)
- func (m *Envelope) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Envelope) ProtoMessage()
- func (m *Envelope) Reset()
- func (m *Envelope) Size() (n int)
- func (m *Envelope) String() string
- func (m *Envelope) Unmarshal(dAtA []byte) error
- func (m *Envelope) XXX_DiscardUnknown()
- func (m *Envelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Envelope) XXX_Merge(src proto.Message)
- func (m *Envelope) XXX_Size() int
- func (m *Envelope) XXX_Unmarshal(b []byte) error
- type JsonFrame
- type KV
- func (*KV) Descriptor() ([]byte, []int)
- func (m *KV) GetKey() string
- func (m *KV) GetValue() string
- func (m *KV) Marshal() (dAtA []byte, err error)
- func (m *KV) MarshalTo(dAtA []byte) (int, error)
- func (m *KV) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*KV) ProtoMessage()
- func (m *KV) Reset()
- func (m *KV) Size() (n int)
- func (m *KV) String() string
- func (m *KV) Unmarshal(dAtA []byte) error
- func (m *KV) XXX_DiscardUnknown()
- func (m *KV) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *KV) XXX_Merge(src proto.Message)
- func (m *KV) XXX_Size() int
- func (m *KV) XXX_Unmarshal(b []byte) error
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)
- func (m *Metadata) GetCount() []KV
- func (m *Metadata) GetCreatedAtNs() int64
- func (m *Metadata) GetEventType() string
- func (m *Metadata) GetForeignId() string
- func (m *Metadata) GetForeignType() string
- func (m *Metadata) GetId() uint64
- func (m *Metadata) GetProperties() []KV
- func (m *Metadata) GetSearch() []KV
- func (m *Metadata) GetTrack() map[string]uint32
- func (m *Metadata) Marshal() (dAtA []byte, err error)
- func (m *Metadata) MarshalTo(dAtA []byte) (int, error)
- func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Metadata) ProtoMessage()
- func (m *Metadata) Reset()
- func (m *Metadata) Size() (n int)
- func (m *Metadata) String() string
- func (m *Metadata) Unmarshal(dAtA []byte) error
- func (m *Metadata) XXX_DiscardUnknown()
- func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Metadata) XXX_Merge(src proto.Message)
- func (m *Metadata) XXX_Size() int
- func (m *Metadata) XXX_Unmarshal(b []byte) error
- type TokenToProduct
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthSpec = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSpec = fmt.Errorf("proto: integer overflow") )
Functions ¶
func ValidateContext ¶
func ValidateEnvelope ¶
Types ¶
type AccessToken ¶
type AccessToken struct {
// contains filtered or unexported fields
}
func NewAccessToken ¶
func NewAccessToken() *AccessToken
func (*AccessToken) AllowContext ¶
func (at *AccessToken) AllowContext(c *Context) bool
func (*AccessToken) AllowEnvelope ¶
func (at *AccessToken) AllowEnvelope(e *Envelope) bool
type Context ¶
type Context struct { Properties []KV `protobuf:"bytes,2,rep,name=properties,proto3" json:"properties"` CreatedAtNs int64 `protobuf:"varint,5,opt,name=created_at_ns,json=createdAtNs,proto3" json:"created_at_ns,omitempty"` ForeignId string `protobuf:"bytes,6,opt,name=foreign_id,json=foreignId,proto3" json:"foreign_id,omitempty"` ForeignType string `protobuf:"bytes,7,opt,name=foreign_type,json=foreignType,proto3" json:"foreign_type,omitempty"` }
func (*Context) Descriptor ¶
func (*Context) GetCreatedAtNs ¶
func (*Context) GetForeignId ¶
func (*Context) GetForeignType ¶
func (*Context) GetProperties ¶
func (*Context) MarshalToSizedBuffer ¶
func (*Context) ProtoMessage ¶
func (*Context) ProtoMessage()
func (*Context) XXX_DiscardUnknown ¶
func (m *Context) XXX_DiscardUnknown()
func (*Context) XXX_Marshal ¶
func (*Context) XXX_Unmarshal ¶
type Envelope ¶
type Envelope struct { Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` }
func (*Envelope) Descriptor ¶
func (*Envelope) GetMetadata ¶
func (*Envelope) GetPayload ¶
func (*Envelope) MarshalToSizedBuffer ¶
func (*Envelope) ProtoMessage ¶
func (*Envelope) ProtoMessage()
func (*Envelope) XXX_DiscardUnknown ¶
func (m *Envelope) XXX_DiscardUnknown()
func (*Envelope) XXX_Marshal ¶
func (*Envelope) XXX_Unmarshal ¶
type JsonFrame ¶
type JsonFrame struct { Search map[string]interface{} `json:"search"` Count map[string]interface{} `json:"count"` Properties map[string]interface{} `json:"properties"` CreatedAtNs int64 `json:"created_at_ns"` ForeignId string `json:"foreign_id"` ForeignType string `json:"foreign_type"` EventType string `json:"event_type"` Payload interface{} `json:"payload"` }
type KV ¶
type KV struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
func (*KV) Descriptor ¶
func (*KV) ProtoMessage ¶
func (*KV) ProtoMessage()
func (*KV) XXX_DiscardUnknown ¶
func (m *KV) XXX_DiscardUnknown()
func (*KV) XXX_Unmarshal ¶
type Metadata ¶
type Metadata struct { Search []KV `protobuf:"bytes,1,rep,name=search,proto3" json:"search"` Count []KV `protobuf:"bytes,2,rep,name=count,proto3" json:"count"` Properties []KV `protobuf:"bytes,3,rep,name=properties,proto3" json:"properties"` CreatedAtNs int64 `protobuf:"varint,5,opt,name=created_at_ns,json=createdAtNs,proto3" json:"created_at_ns,omitempty"` EventType string `protobuf:"bytes,7,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` ForeignId string `protobuf:"bytes,9,opt,name=foreign_id,json=foreignId,proto3" json:"foreign_id,omitempty"` ForeignType string `protobuf:"bytes,10,opt,name=foreign_type,json=foreignType,proto3" json:"foreign_type,omitempty"` Track map[string]uint32 `` /* 153-byte string literal not displayed */ Id uint64 `protobuf:"fixed64,12,opt,name=id,proto3" json:"id,omitempty"` }
func (*Metadata) Descriptor ¶
func (*Metadata) GetCreatedAtNs ¶
func (*Metadata) GetEventType ¶
func (*Metadata) GetForeignId ¶
func (*Metadata) GetForeignType ¶
func (*Metadata) GetProperties ¶
func (*Metadata) MarshalToSizedBuffer ¶
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) XXX_DiscardUnknown ¶
func (m *Metadata) XXX_DiscardUnknown()
func (*Metadata) XXX_Marshal ¶
func (*Metadata) XXX_Unmarshal ¶
type TokenToProduct ¶
type TokenToProduct struct {
// contains filtered or unexported fields
}
func NewTokenMap ¶
func NewTokenMap(toproduct, tocontext string) *TokenToProduct
func (*TokenToProduct) ExtractFromRequest ¶
func (tp *TokenToProduct) ExtractFromRequest(r *http.Request) *AccessToken
func (*TokenToProduct) ExtractFromToken ¶
func (tp *TokenToProduct) ExtractFromToken(token string) *AccessToken
Click to show internal directories.
Click to hide internal directories.