nats

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanUp

func CleanUp()

func InitNats

func InitNats() error

func SendAccessKeyEvent

func SendAccessKeyEvent(key, bid string, expiredDate time.Time,
	permissions []string, uid string, eventType string) error

func SendBucketEvent

func SendBucketEvent(id, uid, name, region, eventType string) error

func SendDownloadFileEvent

func SendDownloadFileEvent(id, fid, name string, size int64,
	bid, contentType string, uploadDate time.Time, path string, isHidden bool) error

func SendEmailEvent

func SendEmailEvent(email, username, otp string, expired time.Time) error

func SendErrorEvent

func SendErrorEvent(content, t string) error

func SendFolderEvent

func SendFolderEvent(id, ownerId, name, fullpath, eventType string) error

func SendKeyPairEvent

func SendKeyPairEvent(public, private, bid string, expiredDate time.Time,
	permissions []string, uid string, eventType string) error

func SendStagingFileEvent

func SendStagingFileEvent(name string, size int64, bid, contentType, path string, isHidden bool) error

func SendUploadFileEvent

func SendUploadFileEvent(id, fid, name string, size int64,
	bid, contentType string, uploadDate time.Time, path string, isHidden bool) error

func SendUploadSuccessFileEvent

func SendUploadSuccessFileEvent(id, fid, name string, size int64,
	bid, contentType string, uploadDate time.Time, path string, isHidden bool) error

func SendUserEvent

func SendUserEvent(firstname, lastname, username, pass, email string,
	dob time.Time, company string, gender, isActive, isBanned bool, eventType string) error

Types

type AccessKeyLog

type AccessKeyLog struct {
	EventLog Event `json:"event_log"`

	Key         string    `json:"key"`
	BucketId    string    `json:"bucket_id"`
	ExpiredDate time.Time `json:"expired_date"`
	Permissions []string  `json:"permissions"`
	Uid         string    `json:"uid"`
}

type BucketEvent

type BucketEvent struct {
	EventLog Event `json:"event_log"`

	Id     string `json:"id"`
	Uid    string `json:"uid"`
	Name   string `json:"name"`
	Region string `json:"region"`
}

type Event

type Event struct {
	Type string    `json:"type"`
	Date time.Time `json:"event_time"`
}

type FolderEvent

type FolderEvent struct {
	EventLog Event `json:"event_log"`

	Id       string `json:"-"`
	OwnerId  string `json:"owner_id"`
	Name     string `json:"name"`
	Fullpath string `json:"fullpath"`
}

type KeyPairLog

type KeyPairLog struct {
	EventLog Event `json:"event_log"`

	Public       string    `json:"public"`
	Private      string    `json:"private"`
	BucketId     string    `json:"bucket_id"`
	GeneratorUid string    `json:"generator_uid"`
	ExpiredDate  time.Time `json:"expired_date"`
	Permissions  []string  `json:"permissions"`
}

type UserEvent

type UserEvent struct {
	EventLog Event `json:"event_log"`

	Firstname string    `json:"firstname"`
	Lastname  string    `json:"lastname"`
	Username  string    `json:"username"`
	Pass      string    `json:"password"`
	Email     string    `json:"email"`
	Dob       time.Time `json:"dob"`
	Company   string    `json:"company"`
	Gender    bool      `json:"gender"`
	IsActive  bool      `json:"is_active"`
	IsBanned  bool      `json:"is_banned"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL