Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseModel ¶
type BaseModel struct {
// Id has to be called Id and not ID, otherwise the foreign key will not work
// ID is a special field in GORM, which it uses as the default Primary Key
Id uint `gorm:"primaryKey;not null;autoIncrement:false"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
}
We cannot use gorm.Model, because we want our ID to be a foreign key to ShareID
type ProtoShare ¶
type ProtoShare struct {
// Including gorm.Model will embed a number of gorm-default fields
}
ProtoShare contains fields that are shared between PublicLinks and Shares. Unfortunately, because these are shared, we cannot name our indexes because then two indexes with the same name would be created
type PublicLink ¶
type PublicLink struct {
// Current tokens are only 16 chars long, but old tokens used to be 32 characters
Token string `gorm:"uniqueIndex:i_token;size:32"`
Quicklink bool
NotifyUploads bool
NotifyUploadsExtraRecipients string
Password string `gorm:"size:255"`
// Users can give a name to a share
LinkName string `gorm:"size:512"`
}
func (*PublicLink) AsCS3PublicShare ¶
func (p *PublicLink) AsCS3PublicShare() *link.PublicShare
type Share ¶
type Share struct {
}
func (*Share) AsCS3ReceivedShare ¶
func (s *Share) AsCS3ReceivedShare(state *ShareState, granteeType userpb.UserType) *collaboration.ReceivedShare
func (*Share) AsCS3Share ¶
func (s *Share) AsCS3Share(granteeType userpb.UserType) *collaboration.Share
type ShareState ¶
type ShareState struct {
// Can not be uid because of lw accs
}
Click to show internal directories.
Click to hide internal directories.