-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypes.go
30 lines (26 loc) · 898 Bytes
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package flickruploader
// OauthToken это токен Oauth авторизации
// TODO перенести в пакет flickr
type OauthToken struct {
Token string `json:"token"`
TokenSecret string `json:"token_secret"`
}
type Filemanager interface {
GetAllPhotos() ([]string, error)
ParsePath(path string) (relativeDirname, fileName string)
}
type DBStorage interface {
PhotosGetAll() (map[string]string, error)
PhotosInsert(path string, id string) error
PhotosDelete(id string) error
//PhotosGetEmptySet() ([][]string, error)
PhotosAddToSet(id, setID string) error
SetsInsert(id, name string) error
SetsGetIDByName(name string) (string, error)
}
type RemoteStorage interface {
UploadPhoto(photoPath string) (string, error)
DeletePhoto(photoID string) error
CreatePhotoset(name, photoID string) (string, error)
AddPhotoToPhotoset(photoID, photosetID string) error
}