Documentation ¶
Index ¶
- Variables
- func Close()
- func FilenameToImageID(filename string) string
- func GetGCS() *storage.Client
- func GetSignedURLs(userID string) map[string]string
- func Init() *storage.Client
- func NewImageService() *imageService
- func NewUserService() *userService
- func ReverseGeocode(lat, lng *float64) (string, string, error)
- type GeoLocation
- type ImageInfo
- type ImageService
- type UserService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Client = Init() UnableToUpload = errors.New("Unable to upload image") )
Functions ¶
func FilenameToImageID ¶
func GetSignedURLs ¶
func NewImageService ¶
func NewImageService() *imageService
func NewUserService ¶
func NewUserService() *userService
Types ¶
type GeoLocation ¶
type ImageService ¶
type ImageService interface { GetAllImages(ctx context.Context, userID *primitive.ObjectID) ([]ImageInfo, error) CreateImage(userID *primitive.ObjectID, lat *float64, lng *float64, country *string, city *string, date *time.Time) (string, error) UploadImage(image *multipart.File, userID, imageID, file_extension string) error StoreImage(image *multipart.File, userID, image_id, file_extension string) error GetMetadata(image *multipart.File) (float64, float64, time.Time, error) }
type UserService ¶
type UserService interface { GetUsers(ctx context.Context) ([]models.User, error) GetUserByID(user_id string) (models.User, error) GetUser(name, email string) (models.User, error) CreateUser(name string, email string, pass []byte) error CheckUserExists(name, email string) error SaveRefreshToken(refreshToken string, userID primitive.ObjectID) error }
Click to show internal directories.
Click to hide internal directories.