message_types.go 585 B

1234567891011121314151617181920212223242526272829303132333435
  1. package protocol
  2. type IndexMessage struct {
  3. Repository string // max:64
  4. Files []FileInfo // max:100000
  5. }
  6. type FileInfo struct {
  7. Name string // max:1024
  8. Flags uint32
  9. Modified int64
  10. Version uint32
  11. Blocks []BlockInfo // max:100000
  12. }
  13. type BlockInfo struct {
  14. Size uint32
  15. Hash []byte // max:64
  16. }
  17. type RequestMessage struct {
  18. Repository string // max:64
  19. Name string // max:1024
  20. Offset uint64
  21. Size uint32
  22. }
  23. type OptionsMessage struct {
  24. Options []Option // max:64
  25. }
  26. type Option struct {
  27. Key string // max:64
  28. Value string // max:1024
  29. }