Documentation
¶
Index ¶
- Constants
- func GenerateError(errorCode string, errorFunction string, errorInfo string) []byte
- func InitDB(connectionString string) (*mongo.Client, error)
- func InitRoutes(app *App) *mux.Router
- func InitServer(host string, port string, dbname string)
- func SendResponse(w http.ResponseWriter, status int, data []byte)
- type APIRequest
- type ApiError
- type ApiRequestFilter
- type App
- type LinkOut
- type LinkRow
- type RequestInfo
Constants ¶
View Source
const ( FilterKindExact = "exact" FilterKindAny = "any" )
Variables ¶
This section is empty.
Functions ¶
func GenerateError ¶
GenerateError - generate error response
func InitRoutes ¶
func InitServer ¶
func SendResponse ¶
func SendResponse(w http.ResponseWriter, status int, data []byte)
SendResponse - send http response
Types ¶
type APIRequest ¶
type ApiRequestFilter ¶
type App ¶
func (*App) ControllerGetDomainLinks ¶
func (app *App) ControllerGetDomainLinks(apiRequest APIRequest) ([]LinkOut, error)
func (*App) HandlerGetDomainLinks ¶
func (app *App) HandlerGetDomainLinks(w http.ResponseWriter, r *http.Request)
HandlerGetDomainLinks - get domain links
type LinkOut ¶
type LinkOut struct { LinkUrl string `json:"link_url"` PageUrl string `json:"page_url"` LinkText string `json:"link_text"` NoFollow int `json:"no_follow"` NoIndex int `json:"no_index"` DateFrom string `json:"date_from"` DateTo string `json:"date_to"` IP []string `json:"ip"` Qty int `json:"qty"` }
LinkOut - link output
type LinkRow ¶
type LinkRow struct { LinkDomain string `json:"link_domain"` LinkSubDomain string `json:"link_sub_domain"` LinkPath string `json:"link_path"` LinkRawQuery string `json:"link_raw_query"` LinkScheme string `json:"link_scheme"` PageHost string `json:"page_host"` PagePath string `json:"page_path"` PageRawQuery string `json:"page_raw_query"` PageScheme string `json:"page_scheme"` LinkText string `json:"link_text"` NoFollow int `json:"no_follow"` NoIndex int `json:"no_index"` DateFrom string `json:"date_from"` DateTo string `json:"date_to"` IP string `json:"ip"` Qty int `json:"qty"` }
LinkRow - link row
type RequestInfo ¶
RequestInfo - request info used to count requests in a period of time
Source Files
¶
Click to show internal directories.
Click to hide internal directories.