mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 16:29:56 +00:00
AUTH-1943 hooked up uploader to logger, added timestamp to session logs, add tests
This commit is contained in:
110
sshlog/session_log.capnp.go
Normal file
110
sshlog/session_log.capnp.go
Normal file
@@ -0,0 +1,110 @@
|
||||
// Code generated by capnpc-go. DO NOT EDIT.
|
||||
|
||||
package sshlog
|
||||
|
||||
import (
|
||||
capnp "zombiezen.com/go/capnproto2"
|
||||
text "zombiezen.com/go/capnproto2/encoding/text"
|
||||
schemas "zombiezen.com/go/capnproto2/schemas"
|
||||
)
|
||||
|
||||
type SessionLog struct{ capnp.Struct }
|
||||
|
||||
// SessionLog_TypeID is the unique identifier for the type SessionLog.
|
||||
const SessionLog_TypeID = 0xa13a07c504a5ab64
|
||||
|
||||
func NewSessionLog(s *capnp.Segment) (SessionLog, error) {
|
||||
st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
|
||||
return SessionLog{st}, err
|
||||
}
|
||||
|
||||
func NewRootSessionLog(s *capnp.Segment) (SessionLog, error) {
|
||||
st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
|
||||
return SessionLog{st}, err
|
||||
}
|
||||
|
||||
func ReadRootSessionLog(msg *capnp.Message) (SessionLog, error) {
|
||||
root, err := msg.RootPtr()
|
||||
return SessionLog{root.Struct()}, err
|
||||
}
|
||||
|
||||
func (s SessionLog) String() string {
|
||||
str, _ := text.Marshal(0xa13a07c504a5ab64, s.Struct)
|
||||
return str
|
||||
}
|
||||
|
||||
func (s SessionLog) Timestamp() (string, error) {
|
||||
p, err := s.Struct.Ptr(0)
|
||||
return p.Text(), err
|
||||
}
|
||||
|
||||
func (s SessionLog) HasTimestamp() bool {
|
||||
p, err := s.Struct.Ptr(0)
|
||||
return p.IsValid() || err != nil
|
||||
}
|
||||
|
||||
func (s SessionLog) TimestampBytes() ([]byte, error) {
|
||||
p, err := s.Struct.Ptr(0)
|
||||
return p.TextBytes(), err
|
||||
}
|
||||
|
||||
func (s SessionLog) SetTimestamp(v string) error {
|
||||
return s.Struct.SetText(0, v)
|
||||
}
|
||||
|
||||
func (s SessionLog) Content() ([]byte, error) {
|
||||
p, err := s.Struct.Ptr(1)
|
||||
return []byte(p.Data()), err
|
||||
}
|
||||
|
||||
func (s SessionLog) HasContent() bool {
|
||||
p, err := s.Struct.Ptr(1)
|
||||
return p.IsValid() || err != nil
|
||||
}
|
||||
|
||||
func (s SessionLog) SetContent(v []byte) error {
|
||||
return s.Struct.SetData(1, v)
|
||||
}
|
||||
|
||||
// SessionLog_List is a list of SessionLog.
|
||||
type SessionLog_List struct{ capnp.List }
|
||||
|
||||
// NewSessionLog creates a new list of SessionLog.
|
||||
func NewSessionLog_List(s *capnp.Segment, sz int32) (SessionLog_List, error) {
|
||||
l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2}, sz)
|
||||
return SessionLog_List{l}, err
|
||||
}
|
||||
|
||||
func (s SessionLog_List) At(i int) SessionLog { return SessionLog{s.List.Struct(i)} }
|
||||
|
||||
func (s SessionLog_List) Set(i int, v SessionLog) error { return s.List.SetStruct(i, v.Struct) }
|
||||
|
||||
func (s SessionLog_List) String() string {
|
||||
str, _ := text.MarshalList(0xa13a07c504a5ab64, s.List)
|
||||
return str
|
||||
}
|
||||
|
||||
// SessionLog_Promise is a wrapper for a SessionLog promised by a client call.
|
||||
type SessionLog_Promise struct{ *capnp.Pipeline }
|
||||
|
||||
func (p SessionLog_Promise) Struct() (SessionLog, error) {
|
||||
s, err := p.Pipeline.Struct()
|
||||
return SessionLog{s}, err
|
||||
}
|
||||
|
||||
const schema_8f43375162194466 = "x\xda\x120q`\x12d\x8dg`\x08dae\xfb" +
|
||||
"\x9f\xb2z)\xcbQv\xab\x85\x0c\x82B\x8c\xff\xd3\\" +
|
||||
"$\x93\x02\xcd\x9d\xfb\x19X\x99\xd8\x19\x18\x04E_\x09" +
|
||||
"*\x82h\xd9r\x06\xc6\xff\xc5\xa9\xc5\xc5\x99\xf9y\xf1" +
|
||||
"L9\xf9\xe9z\xc9\x89\x05y\x05V\xc1`!\xfe<" +
|
||||
"\x9f\xfc\xf4\x00F\xc6@\x0ef\x16\x06\x06\x16F\x06\x06" +
|
||||
"A\xcd \x06\x86@\x0df\xc6@\x13&FAFF" +
|
||||
"\x11F\x90\xa0\xa1\x13\x03C\xa0\x0e3c\xa0\x05\x13\xe3" +
|
||||
"\xff\x92\xcc\xdc\xd4\xe2\x92\xc4\\\x06\xc6\x02F\x1e\x06&" +
|
||||
"F\x1e\x06\xc6\xfa\xe4\xfc\xbc\x92\xd4\xbc\x12F^\x06&" +
|
||||
"F^\x06F@\x00\x00\x00\xff\xff\xdaK$\x1a"
|
||||
|
||||
func init() {
|
||||
schemas.Register(schema_8f43375162194466,
|
||||
0xa13a07c504a5ab64)
|
||||
}
|
Reference in New Issue
Block a user