session_log.capnp.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. // Code generated by capnpc-go. DO NOT EDIT.
  2. package sshlog
  3. import (
  4. capnp "zombiezen.com/go/capnproto2"
  5. text "zombiezen.com/go/capnproto2/encoding/text"
  6. schemas "zombiezen.com/go/capnproto2/schemas"
  7. )
  8. type SessionLog struct{ capnp.Struct }
  9. // SessionLog_TypeID is the unique identifier for the type SessionLog.
  10. const SessionLog_TypeID = 0xa13a07c504a5ab64
  11. func NewSessionLog(s *capnp.Segment) (SessionLog, error) {
  12. st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
  13. return SessionLog{st}, err
  14. }
  15. func NewRootSessionLog(s *capnp.Segment) (SessionLog, error) {
  16. st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2})
  17. return SessionLog{st}, err
  18. }
  19. func ReadRootSessionLog(msg *capnp.Message) (SessionLog, error) {
  20. root, err := msg.RootPtr()
  21. return SessionLog{root.Struct()}, err
  22. }
  23. func (s SessionLog) String() string {
  24. str, _ := text.Marshal(0xa13a07c504a5ab64, s.Struct)
  25. return str
  26. }
  27. func (s SessionLog) Timestamp() (string, error) {
  28. p, err := s.Struct.Ptr(0)
  29. return p.Text(), err
  30. }
  31. func (s SessionLog) HasTimestamp() bool {
  32. p, err := s.Struct.Ptr(0)
  33. return p.IsValid() || err != nil
  34. }
  35. func (s SessionLog) TimestampBytes() ([]byte, error) {
  36. p, err := s.Struct.Ptr(0)
  37. return p.TextBytes(), err
  38. }
  39. func (s SessionLog) SetTimestamp(v string) error {
  40. return s.Struct.SetText(0, v)
  41. }
  42. func (s SessionLog) Content() ([]byte, error) {
  43. p, err := s.Struct.Ptr(1)
  44. return []byte(p.Data()), err
  45. }
  46. func (s SessionLog) HasContent() bool {
  47. p, err := s.Struct.Ptr(1)
  48. return p.IsValid() || err != nil
  49. }
  50. func (s SessionLog) SetContent(v []byte) error {
  51. return s.Struct.SetData(1, v)
  52. }
  53. // SessionLog_List is a list of SessionLog.
  54. type SessionLog_List struct{ capnp.List }
  55. // NewSessionLog creates a new list of SessionLog.
  56. func NewSessionLog_List(s *capnp.Segment, sz int32) (SessionLog_List, error) {
  57. l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 2}, sz)
  58. return SessionLog_List{l}, err
  59. }
  60. func (s SessionLog_List) At(i int) SessionLog { return SessionLog{s.List.Struct(i)} }
  61. func (s SessionLog_List) Set(i int, v SessionLog) error { return s.List.SetStruct(i, v.Struct) }
  62. func (s SessionLog_List) String() string {
  63. str, _ := text.MarshalList(0xa13a07c504a5ab64, s.List)
  64. return str
  65. }
  66. // SessionLog_Promise is a wrapper for a SessionLog promised by a client call.
  67. type SessionLog_Promise struct{ *capnp.Pipeline }
  68. func (p SessionLog_Promise) Struct() (SessionLog, error) {
  69. s, err := p.Pipeline.Struct()
  70. return SessionLog{s}, err
  71. }
  72. const schema_8f43375162194466 = "x\xda\x120q`\x12d\x8dg`\x08dae\xfb" +
  73. "\x9f\xb2z)\xcbQv\xab\x85\x0c\x82B\x8c\xff\xd3\\" +
  74. "$\x93\x02\xcd\x9d\xfb\x19X\x99\xd8\x19\x18\x04E_\x09" +
  75. "*\x82h\xd9r\x06\xc6\xff\xc5\xa9\xc5\xc5\x99\xf9y\xf1" +
  76. "L9\xf9\xe9z\xc9\x89\x05y\x05V\xc1`!\xfe<" +
  77. "\x9f\xfc\xf4\x00F\xc6@\x0ef\x16\x06\x06\x16F\x06\x06" +
  78. "A\xcd \x06\x86@\x0df\xc6@\x13&FAFF" +
  79. "\x11F\x90\xa0\xa1\x13\x03C\xa0\x0e3c\xa0\x05\x13\xe3" +
  80. "\xff\x92\xcc\xdc\xd4\xe2\x92\xc4\\\x06\xc6\x02F\x1e\x06&" +
  81. "F\x1e\x06\xc6\xfa\xe4\xfc\xbc\x92\xd4\xbc\x12F^\x06&" +
  82. "F^\x06F@\x00\x00\x00\xff\xff\xdaK$\x1a"
  83. func init() {
  84. schemas.Register(schema_8f43375162194466,
  85. 0xa13a07c504a5ab64)
  86. }