Documentation ¶
Index ¶
- func AccessResource(c *gin.Context)
- func AddHobby(c *gin.Context)
- func CreatePost(c *gin.Context)
- func CreateUser(c *gin.Context)
- func CreateUserAuth(c *gin.Context)
- func DeletePost(c *gin.Context)
- func GetHobbies(c *gin.Context)
- func GetPost(c *gin.Context)
- func GetPosts(c *gin.Context)
- func GetUser(c *gin.Context)
- func GetUsers(c *gin.Context)
- func Login(c *gin.Context)
- func MongoCreateOne(c *gin.Context)
- func MongoDeleteByID(c *gin.Context)
- func MongoDeleteFieldByID(c *gin.Context)
- func MongoFilter(geocoding Geocoding, addDocIDInFilter bool) bson.M
- func MongoGetAll(c *gin.Context)
- func MongoGetByFilter(c *gin.Context)
- func MongoGetByID(c *gin.Context)
- func MongoUpdateByID(c *gin.Context)
- func RedisCreate(c *gin.Context)
- func RedisCreateHash(c *gin.Context)
- func RedisDelete(c *gin.Context)
- func RedisDeleteHash(c *gin.Context)
- func RedisRead(c *gin.Context)
- func RedisReadHash(c *gin.Context)
- func Refresh(c *gin.Context)
- func UpdatePost(c *gin.Context)
- func UpdateUser(c *gin.Context)
- type Geocoding
- type Geometry
- type LoginPayload
- type RedisData
- type RedisDataHash
- type RedisDataHashValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessResource ¶
AccessResource - can be accessed by basic auth
func MongoDeleteByID ¶
MongoDeleteByID - delete one document by ID
func MongoDeleteFieldByID ¶
MongoDeleteFieldByID - delete existing field(s) from a document
func MongoFilter ¶
MongoFilter - search filter
func MongoGetByFilter ¶
MongoGetByFilter - find documents using filter
func MongoUpdateByID ¶
MongoUpdateByID - update a document edit existing fields add new fields do not remove any existing field
Types ¶
type Geocoding ¶
type Geocoding struct { ID primitive.ObjectID `json:"id" bson:"_id"` FormattedAddress string `json:"formatted_address,omitempty" bson:"formatted_address,omitempty"` StreetName string `json:"street_name,omitempty" bson:"street_name,omitempty"` HouseNumber string `json:"house_number,omitempty" bson:"house_number,omitempty"` PostalCode string `json:"postal_code,omitempty" bson:"postal_code,omitempty"` County string `json:"county,omitempty" bson:"county,omitempty"` City string `json:"city,omitempty" bson:"city,omitempty"` State string `json:"state,omitempty" bson:"state,omitempty"` StateCode string `json:"state_code,omitempty" bson:"state_code,omitempty"` Country string `json:"country,omitempty" bson:"country,omitempty"` CountryCode string `json:"country_code,omitempty" bson:"country_code,omitempty"` Geometry Geometry `json:"geometry,omitempty" bson:"inline"` }
Geocoding - struct for address
func MongoTrimSpace ¶
MongoTrimSpace - remove all leading and trailing white spaces
type Geometry ¶
type Geometry struct { Latitude float64 `json:"lat,omitempty" bson:"lat,omitempty"` Longitude float64 `json:"lng,omitempty" bson:"lng,omitempty"` }
Geometry - struct for latitude and longitude
type LoginPayload ¶
LoginPayload ...
type RedisDataHash ¶
type RedisDataHash struct { Key string `json:"Key"` Value RedisDataHashValue }
RedisDataHash - key:hashValues
Click to show internal directories.
Click to hide internal directories.