Documentation
¶
Index ¶
- Constants
- func AssertEventType[T event.Event](evt event.Event, eventName string) (T, error)
- func DoFire(ctx core.Context, event event.Event, async bool) error
- func EventHandler[T event.Event](eventName string, handler func(T) error) event.ListenerFunc
- func Fire[T event.Event](ctx core.Context, eventName string, cb func(evt T) error) error
- func FireAsync[T event.Event](ctx core.Context, eventName string, cb func(evt T) error) error
- func FireBootCompleteEvent(ctx core.Context) error
- func FireConfigPropertyUpdateEvent(ctx core.Context, key string, value interface{}, ...) error
- func FireDownloadCompletedEvent(ctx core.Context, uploadID uint, bytes uint64, ip string) error
- func FireDownloadCompletedEventAsync(ctx core.Context, uploadID uint, bytes uint64, ip string) error
- func FireStorageObjectUnpinnedEvent(ctx core.Context, pin *models.Pin) error
- func FireStorageObjectUploadedEvent(ctx core.Context, pin *models.Pin, ip string) error
- func FireUseServicerSubdomainSetEvent(ctx core.Context, subdomain string) error
- func FireUserActivatedEvent(ctx core.Context, user *models.User) error
- func FireUserCreatedEvent(ctx core.Context, user *models.User) error
- func GetEvent(ctx core.Context, eventName string) (event.Event, error)
- func Listen[T event.Event](ctx core.Context, eventName string, handler func(T) error)
- func SetupFire[T event.Event](ctx core.Context, eventName string) (T, error)
- type BootCompleteEvent
- type ConfigPropertyUpdateEvent
- func (e ConfigPropertyUpdateEvent) Category() config.ConfigPropertyUpdateCategory
- func (e ConfigPropertyUpdateEvent) Entity() string
- func (e ConfigPropertyUpdateEvent) PropertyKey() string
- func (e ConfigPropertyUpdateEvent) PropertyValue() interface{}
- func (e *ConfigPropertyUpdateEvent) SetCategory(category config.ConfigPropertyUpdateCategory)
- func (e ConfigPropertyUpdateEvent) SetEntity(entity string)
- func (e *ConfigPropertyUpdateEvent) SetProperty(key string, value interface{})
- func (e ConfigPropertyUpdateEvent) SetSubEntity(subEntity string)
- func (e ConfigPropertyUpdateEvent) SubEntity() string
- type DownloadCompletedEvent
- func (e DownloadCompletedEvent) Bytes() uint64
- func (e DownloadCompletedEvent) IP() string
- func (e *DownloadCompletedEvent) SetBytes(size uint64)
- func (e *DownloadCompletedEvent) SetIP(ip string)
- func (e *DownloadCompletedEvent) SetUploadID(uploadID uint)
- func (e DownloadCompletedEvent) UploadID() uint
- type StorageObjectPinnedEvent
- type StorageObjectUnpinnedEvent
- type UserActivatedEvent
- type UserCreatedEvent
- type UserServiceSubdomainSetEvent
Constants ¶
View Source
const (
EVENT_BOOT_COMPLETE = "boot.complete"
)
View Source
const (
EVENT_CONFIG_PROPERTY_UPDATE = "config.property.update"
)
View Source
const EVENT_DOWNLOAD_COMPLETED = "download.completed"
View Source
const (
EVENT_STORAGE_OBJECT_PINNED = "storage.object.pinned"
)
View Source
const (
EVENT_STORAGE_OBJECT_UNPINNED = "storage.object.unpinned"
)
View Source
const (
EVENT_USER_ACTIVATED = "user.activated"
)
View Source
const (
EVENT_USER_CREATED = "user.created"
)
View Source
const (
EVENT_USER_SERVICE_SUBDOMAIN_SET = "user.subdomain.set"
)
Variables ¶
This section is empty.
Functions ¶
func AssertEventType ¶
func EventHandler ¶
func FireBootCompleteEvent ¶
func FireUserActivatedEvent ¶
Types ¶
type BootCompleteEvent ¶
func (BootCompleteEvent) Context ¶
func (e BootCompleteEvent) Context() core.Context
func (*BootCompleteEvent) SetContext ¶
func (e *BootCompleteEvent) SetContext(ctx core.Context)
type ConfigPropertyUpdateEvent ¶
func (ConfigPropertyUpdateEvent) Category ¶
func (e ConfigPropertyUpdateEvent) Category() config.ConfigPropertyUpdateCategory
func (ConfigPropertyUpdateEvent) Entity ¶
func (e ConfigPropertyUpdateEvent) Entity() string
func (ConfigPropertyUpdateEvent) PropertyKey ¶
func (e ConfigPropertyUpdateEvent) PropertyKey() string
func (ConfigPropertyUpdateEvent) PropertyValue ¶
func (e ConfigPropertyUpdateEvent) PropertyValue() interface{}
func (*ConfigPropertyUpdateEvent) SetCategory ¶
func (e *ConfigPropertyUpdateEvent) SetCategory(category config.ConfigPropertyUpdateCategory)
func (ConfigPropertyUpdateEvent) SetEntity ¶
func (e ConfigPropertyUpdateEvent) SetEntity(entity string)
func (*ConfigPropertyUpdateEvent) SetProperty ¶
func (e *ConfigPropertyUpdateEvent) SetProperty(key string, value interface{})
func (ConfigPropertyUpdateEvent) SetSubEntity ¶
func (e ConfigPropertyUpdateEvent) SetSubEntity(subEntity string)
func (ConfigPropertyUpdateEvent) SubEntity ¶
func (e ConfigPropertyUpdateEvent) SubEntity() string
type DownloadCompletedEvent ¶
func (DownloadCompletedEvent) Bytes ¶
func (e DownloadCompletedEvent) Bytes() uint64
func (DownloadCompletedEvent) IP ¶
func (e DownloadCompletedEvent) IP() string
func (*DownloadCompletedEvent) SetBytes ¶
func (e *DownloadCompletedEvent) SetBytes(size uint64)
func (*DownloadCompletedEvent) SetIP ¶
func (e *DownloadCompletedEvent) SetIP(ip string)
func (*DownloadCompletedEvent) SetUploadID ¶
func (e *DownloadCompletedEvent) SetUploadID(uploadID uint)
func (DownloadCompletedEvent) UploadID ¶
func (e DownloadCompletedEvent) UploadID() uint
type StorageObjectPinnedEvent ¶
func (StorageObjectPinnedEvent) IP ¶
func (e StorageObjectPinnedEvent) IP() string
func (StorageObjectPinnedEvent) Pin ¶
func (e StorageObjectPinnedEvent) Pin() *models.Pin
func (*StorageObjectPinnedEvent) SetIP ¶
func (e *StorageObjectPinnedEvent) SetIP(ip string)
func (*StorageObjectPinnedEvent) SetPin ¶
func (e *StorageObjectPinnedEvent) SetPin(metadata *models.Pin)
type StorageObjectUnpinnedEvent ¶
func (StorageObjectUnpinnedEvent) IP ¶
func (e StorageObjectUnpinnedEvent) IP() string
func (StorageObjectUnpinnedEvent) Pin ¶
func (e StorageObjectUnpinnedEvent) Pin() *models.Pin
func (*StorageObjectUnpinnedEvent) SetPin ¶
func (e *StorageObjectUnpinnedEvent) SetPin(metadata *models.Pin)
type UserActivatedEvent ¶
func (*UserActivatedEvent) SetUser ¶
func (e *UserActivatedEvent) SetUser(user *models.User)
func (UserActivatedEvent) User ¶
func (e UserActivatedEvent) User() *models.User
type UserCreatedEvent ¶
func (*UserCreatedEvent) SetUser ¶
func (e *UserCreatedEvent) SetUser(user *models.User)
func (UserCreatedEvent) User ¶
func (e UserCreatedEvent) User() *models.User
type UserServiceSubdomainSetEvent ¶
func (*UserServiceSubdomainSetEvent) SetSubdomain ¶
func (e *UserServiceSubdomainSetEvent) SetSubdomain(subdomain string)
func (UserServiceSubdomainSetEvent) Subdomain ¶
func (e UserServiceSubdomainSetEvent) Subdomain() string
Click to show internal directories.
Click to hide internal directories.