Documentation
¶
Index ¶
Constants ¶
View Source
const (AutoShare = "Auto Share" LinkToShare = "Link to Share" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Share ¶
type Share struct { State Title string HostSharedLink string OriginalLink string CreatedBy string CreatedAt time.Time Size int64 Statistics }State
Share contains all information of a shared link.
type State ¶
type State string
State is the current status of some shared link.
const ( StatusPending State = "PENDING" // batch add "link to share" will create a pending task first StatusUnknown State = "UNKNOWN" StatusCreated State = "CREATED" StatusOK State = "OK" StatusDeleted State = "DELETED" StatusNotFound State = "NOT_FOUND" StatusSensitive State = "SENSITIVE" // the content corresponding to the link contains sensitive resources. StatusBlocked State = "BLOCKED" // blocked by user self. StatusError State = "ERROR" )
Enum all Statuses.
func StatusFromFileStatus ¶
StatusFromFileStatus returns the status of shared link corresponding to the status of file.
type Statistics ¶
type Statistics struct { // Visitor is the number of times the shared link was viewed by other users Visitor int32 // Stored is the number of times the shared link was saved by other users Stored int32 // Revenue is the total revenue of this shared link in SGD cents. Revenue int64 }
Statistics is the statistical data of this shared link.
Click to show internal directories.
Click to hide internal directories.