Documentation ¶
Index ¶
- func CreatePack(w http.ResponseWriter, r *http.Request)
- func CreatePlan(w http.ResponseWriter, r *http.Request)
- func CreateUser(w http.ResponseWriter, r *http.Request)
- func GetDevByUsername(w http.ResponseWriter, r *http.Request)
- func GetDevCount(w http.ResponseWriter, r *http.Request)
- func GetDevs(w http.ResponseWriter, r *http.Request)
- func GetDoneIconCountByDev(w http.ResponseWriter, r *http.Request)
- func GetDoneIconsByPackByDev(w http.ResponseWriter, r *http.Request)
- func GetIconByComponentByPackByDev(w http.ResponseWriter, r *http.Request)
- func GetIconCountByDev(w http.ResponseWriter, r *http.Request)
- func GetIcons(w http.ResponseWriter, r *http.Request)
- func GetIconsByDev(w http.ResponseWriter, r *http.Request)
- func GetIconsByPackByDev(w http.ResponseWriter, r *http.Request)
- func GetIndex(w http.ResponseWriter, r *http.Request)
- func GetPackCountByDev(w http.ResponseWriter, r *http.Request)
- func GetPacks(w http.ResponseWriter, r *http.Request)
- func GetPacksByDev(w http.ResponseWriter, r *http.Request)
- func GetPendingIconCountByDev(w http.ResponseWriter, r *http.Request)
- func GetPendingIconsByPackByDev(w http.ResponseWriter, r *http.Request)
- func GetPlans(w http.ResponseWriter, r *http.Request)
- func GetUsers(w http.ResponseWriter, r *http.Request)
- func GetVersion(w http.ResponseWriter, r *http.Request)
- func NotFound(w http.ResponseWriter, r *http.Request)
- func SaveIcon(w http.ResponseWriter, r *http.Request)
- func SaveIcons(w http.ResponseWriter, r *http.Request)
- func UpdateIconStatus(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePack ¶
func CreatePack(w http.ResponseWriter, r *http.Request)
CreatePack creates a new icon pack * POST /developers/{developer}/packs swagger:operation POST /developers/{developer}/packs IconPacks CreatePack
Add an icon pack ¶
Creates a new icon pack and adds it to the database; rejects the request on conflict --- consumes:
- application/json
produces:
- application/json
security:
- api_key: []
parameters:
- name: developer in: path description: username of the developer who owns the icon pack required: true type: string
- name: request in: body description: information about the new icon pack required: true schema: type: object properties: name: type: string description: name of icon pack example: Amphetamine developer_username: type: string description: name of icon pack developer example: ayush url: type: string description: play store URL example: https://play.google.com/store/apps/details?id=com.ayushm.icons.amphetamine billing_status: type: string description: billing status (active | inactive) example: active
responses:
"200": description: OK "500": description: server error
func CreatePlan ¶
func CreatePlan(w http.ResponseWriter, r *http.Request)
CreatePlan creates a new plan
func CreateUser ¶
func CreateUser(w http.ResponseWriter, r *http.Request)
CreateUser creates a new user
func GetDevByUsername ¶
func GetDevByUsername(w http.ResponseWriter, r *http.Request)
GetDevByUsername renders the dev with the given username * GET /developers/{developer} swagger:operation GET /developers/{developer} Users GetDevByUsername
Get a developer by username ¶
Fetches the developer with the provided username --- produces:
- application/json
parameters:
- name: developer in: path description: developer username required: true type: string
responses:
"200": description: OK schema: type: object properties: status: type: string description: status message example: success developers: type: array items: "$ref": "#/definitions/User" "500": description: bad request schema: type: object properties: status: type: string description: status message example: failure message: type: string description: informational message example: server error error: type: string description: error message example: invalid dev
func GetDevCount ¶
func GetDevCount(w http.ResponseWriter, r *http.Request)
GetDevCount renders the number of devs in the database * GET /developers/count swagger:operation GET /developers/count Users GetDevCount
Get the total number of developers ¶
Fetches the total count of developers in the database --- produces:
- application/json
responses:
"200": description: OK schema: type: object properties: status: type: string description: status message count: type: integer description: number of developers
func GetDevs ¶
func GetDevs(w http.ResponseWriter, r *http.Request)
GetDevs renders all the devs in the database * GET /developers swagger:operation GET /developers Users GetDevs
Gets the list of all the developers present in the database. --- produces:
- application/json
responses:
"200": description: OK schema: type: object properties: status: type: string description: status message example: success developers: type: array items: "$ref": "#/definitions/User"
func GetDoneIconCountByDev ¶
func GetDoneIconCountByDev(w http.ResponseWriter, r *http.Request)
GetDoneIconCountByDev responds with the number of icon requests
func GetDoneIconsByPackByDev ¶
func GetDoneIconsByPackByDev(w http.ResponseWriter, r *http.Request)
GetDoneIconsByPackByDev responds with a list of all the icons
func GetIconByComponentByPackByDev ¶
func GetIconByComponentByPackByDev(w http.ResponseWriter, r *http.Request)
GetIconByComponentByPackByDev responds with the matching icon
func GetIconCountByDev ¶
func GetIconCountByDev(w http.ResponseWriter, r *http.Request)
GetIconCountByDev responds with the number of icon requests
func GetIcons ¶
func GetIcons(w http.ResponseWriter, r *http.Request)
GetIcons responds with a list of all the icons in the db * GET /icons swagger:operation GET /icons IconRequests GetIcons
Get the list of all icon requests ¶
Fetches the entire list of all icon requests belonging to all icon packs --- produces:
- application/json
responses:
"200": description: OK schema: type: object properties: status: type: string description: status message example: success message: type: string description: informational message example: retrieved 146 icons icons: type: array items: "$ref": "#/definitions/Icon"
func GetIconsByDev ¶
func GetIconsByDev(w http.ResponseWriter, r *http.Request)
GetIconsByDev responds with a list of all the icons by the dev
func GetIconsByPackByDev ¶
func GetIconsByPackByDev(w http.ResponseWriter, r *http.Request)
GetIconsByPackByDev responds with a list of all the icons
func GetIndex ¶
func GetIndex(w http.ResponseWriter, r *http.Request)
GetIndex returns the index response
func GetPackCountByDev ¶
func GetPackCountByDev(w http.ResponseWriter, r *http.Request)
GetPackCountByDev responds with the number of icon requests
func GetPacks ¶
func GetPacks(w http.ResponseWriter, r *http.Request)
GetPacks gets all the icon packs * GET /packs swagger:operation GET /packs IconPacks GetPacks
Get the list of all icon packs ¶
Fetches the entire list of all icon packs from all developers present in the database --- produces:
- application/json
responses:
"200": description: OK schema: type: object properties: status: type: string description: status message example: success packs: type: array items: "$ref": "#/definitions/Pack"
func GetPacksByDev ¶
func GetPacksByDev(w http.ResponseWriter, r *http.Request)
GetPacksByDev renders all the packs by the given dev
func GetPendingIconCountByDev ¶
func GetPendingIconCountByDev(w http.ResponseWriter, r *http.Request)
GetPendingIconCountByDev responds with the number of icon requests
func GetPendingIconsByPackByDev ¶
func GetPendingIconsByPackByDev(w http.ResponseWriter, r *http.Request)
GetPendingIconsByPackByDev responds with a list of all the icons
func GetUsers ¶
func GetUsers(w http.ResponseWriter, r *http.Request)
GetUsers renders all the users in the database
func GetVersion ¶
func GetVersion(w http.ResponseWriter, r *http.Request)
GetVersion returns the current version of the application
func NotFound ¶
func NotFound(w http.ResponseWriter, r *http.Request)
NotFound handles the case where the url has no mapping
func SaveIcon ¶
func SaveIcon(w http.ResponseWriter, r *http.Request)
SaveIcon saves the icon to the database
func SaveIcons ¶
func SaveIcons(w http.ResponseWriter, r *http.Request)
SaveIcons saves the list of icons to the database
func UpdateIconStatus ¶
func UpdateIconStatus(w http.ResponseWriter, r *http.Request)
UpdateIconStatus takes the new status and updates the database
Types ¶
This section is empty.