Documentation ¶
Index ¶
- Variables
- func NewEvents(parent ulid.I, pbs ...pb.UnixDomainEvent) ([]events.Event, error)
- func NewPbDomainCreated(ev *EvDomainCreated) pb.UnixDomainEvent
- func NewPbGroupCreated(group string, gid uint32) pb.UnixDomainEvent
- func NewPbGroupDeleted(gid uint32) pb.UnixDomainEvent
- func NewPbGroupUserAdded(ev *EvGroupUserAdded) pb.UnixDomainEvent
- func NewPbGroupUserRemoved(ev *EvGroupUserRemoved) pb.UnixDomainEvent
- func NewPbUserCreated(ev *EvUserCreated) pb.UnixDomainEvent
- func NewPbUserDeleted(uid uint32) pb.UnixDomainEvent
- type EvDomainCreated
- type EvGroupCreated
- type EvGroupDeleted
- type EvGroupUserAdded
- type EvGroupUserRemoved
- type EvUserCreated
- type EvUserDeleted
- type Event
- func (e *Event) Id() ulid.I
- func (e *Event) MarshalProto() ([]byte, error)
- func (e *Event) Parent() ulid.I
- func (e *Event) PbUnixDomainEvent() *pb.UnixDomainEvent
- func (e *Event) UnmarshalProto(data []byte) error
- func (e Event) WithId(id ulid.I) events.Event
- func (e Event) WithParent(parent ulid.I) events.Event
- type UnixDomainEvent
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnknownUnixDomainEvent = errors.New("unknown UnixDomainEvent type")
Functions ¶
func NewPbDomainCreated ¶
func NewPbDomainCreated(ev *EvDomainCreated) pb.UnixDomainEvent
func NewPbGroupCreated ¶
func NewPbGroupCreated(group string, gid uint32) pb.UnixDomainEvent
func NewPbGroupDeleted ¶
func NewPbGroupDeleted(gid uint32) pb.UnixDomainEvent
func NewPbGroupUserAdded ¶
func NewPbGroupUserAdded(ev *EvGroupUserAdded) pb.UnixDomainEvent
func NewPbGroupUserRemoved ¶
func NewPbGroupUserRemoved(ev *EvGroupUserRemoved) pb.UnixDomainEvent
func NewPbUserCreated ¶
func NewPbUserCreated(ev *EvUserCreated) pb.UnixDomainEvent
func NewPbUserDeleted ¶
func NewPbUserDeleted(uid uint32) pb.UnixDomainEvent
Types ¶
type EvDomainCreated ¶
type EvDomainCreated struct {
Name string
}
`UnixDomainEvent_EV_UNIX_DOMAIN_CREATED` aka `EvDomainCreated`.
func (*EvDomainCreated) UnixDomainEvent ¶
func (*EvDomainCreated) UnixDomainEvent()
type EvGroupCreated ¶
`UnixDomainEvent_EV_UNIX_GROUP_CREATED` aka `EvGroupCreated`.
func (*EvGroupCreated) UnixDomainEvent ¶
func (*EvGroupCreated) UnixDomainEvent()
type EvGroupDeleted ¶
type EvGroupDeleted struct {
Gid uint32
}
`UnixDomainEvent_EV_UNIX_GROUP_DELETED` aka `EvGroupDeleted`.
func (*EvGroupDeleted) UnixDomainEvent ¶
func (*EvGroupDeleted) UnixDomainEvent()
type EvGroupUserAdded ¶
`UnixDomainEvent_EV_UNIX_GROUP_USER_ADDED` aka `EvGroupUserAdded`.
func (*EvGroupUserAdded) UnixDomainEvent ¶
func (*EvGroupUserAdded) UnixDomainEvent()
type EvGroupUserRemoved ¶
`UnixDomainEvent_EV_UNIX_GROUP_USER_REMOVED` aka `EvGroupUserRemoved`.
func (*EvGroupUserRemoved) UnixDomainEvent ¶
func (*EvGroupUserRemoved) UnixDomainEvent()
type EvUserCreated ¶
`UnixDomainEvent_EV_UNIX_USER_CREATED` aka `EvUserCreated`.
func (*EvUserCreated) UnixDomainEvent ¶
func (*EvUserCreated) UnixDomainEvent()
type EvUserDeleted ¶
type EvUserDeleted struct {
Uid uint32
}
`UnixDomainEvent_EV_UNIX_USER_DELETED` aka `EvUserDeleted`.
func (*EvUserDeleted) UnixDomainEvent ¶
func (*EvUserDeleted) UnixDomainEvent()
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func (*Event) MarshalProto ¶
func (*Event) PbUnixDomainEvent ¶
func (e *Event) PbUnixDomainEvent() *pb.UnixDomainEvent
func (*Event) UnmarshalProto ¶
type UnixDomainEvent ¶
type UnixDomainEvent interface {
UnixDomainEvent()
}
func MustParsePbUnixDomainEvent ¶
func MustParsePbUnixDomainEvent(evpb *pb.UnixDomainEvent) UnixDomainEvent
func ParsePbUnixDomainEvent ¶
func ParsePbUnixDomainEvent( evpb *pb.UnixDomainEvent, ) (ev UnixDomainEvent, err error)
`ParsePbUnixDomainEvent()` converts a protobuf struct to an `Ev*` struct.
Click to show internal directories.
Click to hide internal directories.