add set background and icon of hub functions
This commit is contained in:
@@ -24,6 +24,8 @@ const (
|
||||
HubChannelFile
|
||||
UserAvatar
|
||||
UserProfileBg
|
||||
HubIcon
|
||||
HubBackground
|
||||
)
|
||||
|
||||
type DataTypePrefix string
|
||||
@@ -33,11 +35,14 @@ const (
|
||||
HubChannelFilePrefix DataTypePrefix = "hub/"
|
||||
UserAvatarPrefix DataTypePrefix = "userAvatar/"
|
||||
UserProfileBgPrefix DataTypePrefix = "userProfileBg/"
|
||||
HubIconPrefix DataTypePrefix = "hubIcon/"
|
||||
HubBackgroundPrefix DataTypePrefix = "hubBackground/"
|
||||
)
|
||||
|
||||
type GetKeyOptions struct {
|
||||
UserId uuid.UUID
|
||||
ConnectionId uuid.UUID
|
||||
HubId uuid.UUID
|
||||
ChannelId uuid.UUID
|
||||
MimeType string
|
||||
UploadType DataType
|
||||
@@ -58,6 +63,10 @@ func GetKey(opts *GetKeyOptions) string {
|
||||
return string(UserAvatarPrefix) + opts.UserId.String() + key
|
||||
case UserProfileBg:
|
||||
return string(UserProfileBgPrefix) + opts.UserId.String() + key
|
||||
case HubIcon:
|
||||
return string(HubIconPrefix) + opts.HubId.String() + key
|
||||
case HubBackground:
|
||||
return string(HubBackgroundPrefix) + opts.HubId.String() + key
|
||||
default:
|
||||
return string(ConnectionFilePrefix) + opts.ConnectionId.String() + key
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user