Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeAddress(dst, src []byte) error
- type Address
- type AuthHeader
- type Event
- type EventBase
- type EventBody
- func (eb EventBody) Bytes() []byte
- func (eb EventBody) Data() []byte
- func (eb EventBody) SetType(et EventType)
- func (eb EventBody) SetVersion(version byte)
- func (eb EventBody) String() string
- func (eb EventBody) Type() EventType
- func (eb EventBody) VerifyData() bool
- func (eb EventBody) Version() byte
- type EventInput
- type EventInputVerifierFunc
- type EventQuery
- type EventRepository
- type EventResponse
- type EventService
- type EventType
- type Repository
- type Service
Constants ¶
View Source
const ( AddressSize = 32 AddressLen = (AddressSize * 2) + 2 )
View Source
const ( EventTypeSize = 4 EventBodyJSON = 0 )
View Source
const Protocol = 0
Variables ¶
Functions ¶
func DecodeAddress ¶
Types ¶
type Address ¶
type Address [AddressSize]byte
func AddressFromString ¶
func (Address) MarshalJSON ¶
func (*Address) UnmarshalJSON ¶
type AuthHeader ¶
type Event ¶
type Event struct { *EventInput ID uuid.UUID `json:"id"` Author Address `json:"author"` }
type EventBody ¶
type EventBody []byte
func NewEventBodyJSON ¶
func (EventBody) SetVersion ¶
func (EventBody) VerifyData ¶
type EventInput ¶
type EventInput struct { Body EventBody `json:"body"` Auth AuthHeader `json:"auth"` }
func (*EventInput) Verify ¶
func (ei *EventInput) Verify(f EventInputVerifierFunc) bool
type EventInputVerifierFunc ¶
type EventInputVerifierFunc func(*EventInput) bool
type EventQuery ¶
type EventRepository ¶
type EventResponse ¶
type EventService ¶
type EventService interface { EventQuery Create(context.Context, *EventInput) (*EventResponse, error) }
type Repository ¶
type Repository struct{ Event EventRepository }
type Service ¶
type Service struct{ Event EventService }
Click to show internal directories.
Click to hide internal directories.