Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/abishekmuthian/open-payment-host
/ functions
Functions
1,100 in github.com/abishekmuthian/open-payment-host
⨍
Functions
1,100
◇
Types & classes
194
↓ 285 callers
Method
AddKey
AddKey adds a key/value pair to context
src/lib/view/render.go:159
↓ 271 callers
Function
Error
Error sends the key/value map at level Error to all registered loggers.
src/lib/server/log/log.go:51
↓ 254 callers
Method
Fatalf
Fatalf the message with the given arguments to our internal logger, and then exits with status 1
src/lib/server/deprecated.go:31
↓ 223 callers
Function
Info
Info sends the key/value map at level Info to all registered loggers.
src/lib/server/log/log.go:45
↓ 197 callers
Function
Get
Get returns a specific value or "" if no value
src/lib/server/config/config.go:128
↓ 167 callers
Method
Get
Set accepted methods
src/lib/mux/mux.go:32
↓ 115 callers
Function
InternalError
InternalError returns a new StatusError with Status StatusInternalServerError and optional Title and Message Usage: return router.InternalError(err)
src/lib/server/errors.go:59
↓ 76 callers
Method
Add
Add adds a route for this request with the default methods (GET/HEAD) Route is returned so that method functions can be chained
src/lib/mux/mux.go:207
↓ 71 callers
Method
Set
(string, string)
src/lib/auth/session.go:49
↓ 70 callers
Method
Where
Where defines a WHERE clause on SQL - Additional calls add WHERE () AND () clauses
src/lib/query/query.go:530
↓ 57 callers
Function
Params
Params returns a new set of params parsed from the request.
src/lib/mux/params.go:18
↓ 55 callers
Method
Post
()
src/lib/mux/mux.go:33
↓ 49 callers
Method
String
String returns a string representation of this object
src/lib/assets/file.go:112
↓ 47 callers
Method
Close
()
src/lib/query/adapters/database.go:15
↓ 44 callers
Method
Error
Error returns err.Message
src/lib/mandrill/mandrill.go:208
↓ 44 callers
Function
Find
Find fetches a single story record from the database by id.
src/products/query.go:112
↓ 42 callers
Method
get
* get -- return the next character from stdin. Watch out for lookahead. If the character is a control character, translate it to a space or line
src/lib/assets/internal/jsmin/jsmin.go:84
↓ 40 callers
Function
GetBool
GetBool returns the current configuration value as bool (yes=true, no=false), or false if no value
src/lib/server/config/config.go:139
↓ 39 callers
Method
GetInt
GetInt returns the first value associated with the given key as an integer. If there is no value or a parse error, it returns 0 If the string contains
src/lib/mux/params.go:279
↓ 39 callers
Method
Printf
(format string, args ...interface{})
src/lib/mux/log/log.go:80
↓ 37 callers
Function
Redirect
Redirect uses status 302 StatusFound by default - this is not a permanent redirect We don't accept external or relative paths for security reasons
src/lib/server/redirects.go:11
↓ 37 callers
Method
Render
Render our template into layout using our context and write out to writer
src/lib/view/render.go:249
↓ 36 callers
Method
Update
Update one model specified in this query - the column names MUST be verified in the model
src/lib/query/query.go:200
↓ 36 callers
Method
Write
Write ensures content length is 0 and writes to the gzip writer. If Content-Type is not set it attempts to sniff it using http.DetectContentType.
src/lib/mux/middleware/gzip/gzip.go:87
↓ 35 callers
Method
Order
Order defines ORDER BY sql
src/lib/query/query.go:632
↓ 35 callers
Method
Template
Template sets the template used
src/lib/view/render.go:108
↓ 34 callers
Function
CurrentUser
CurrentUser returns the saved user (or an empty anon user) for the current session cookie
src/lib/session/session.go:15
↓ 33 callers
Function
NotAuthorizedError
NotAuthorizedError returns a new StatusError with Status StatusUnauthorized and optional Title and Message
src/lib/server/errors.go:65
↓ 32 callers
Function
CheckAuthenticity
CheckAuthenticity checks the authenticity token in params against cookie - The masked token is inserted into forms and POSTS by js. The token is inser
src/lib/session/session.go:72
↓ 32 callers
Function
PagesQuery
Query returns a new query for pages
src/lib/query/query_test.go:87
↓ 30 callers
Function
NotFoundError
NotFoundError returns a new StatusError with Status StatusNotFound and optional Title and Message Usage return router.NotFoundError(err,"Optional Titl
src/lib/server/errors.go:52
↓ 30 callers
Function
ValidateString
ValidateString returns the string value of param or ""
src/lib/resource/validate.go:79
↓ 25 callers
Method
HTML
HTML sets the view content as html (use with caution)
src/lib/view/render.go:153
↓ 24 callers
Method
WriteString
WriteString writes the string to the Writer.
src/lib/mux/log/default.go:31
↓ 23 callers
Method
Join
Define a join clause on SQL - we create an inner join like this: INNER JOIN extras_seasons ON extras.id = extra_id q.Select("SELECT units.* FROM units
src/lib/query/query.go:609
↓ 23 callers
Function
Production
These convenience functions wrap the Current pkg global Production returns true if current config is production.
src/lib/server/config/config.go:118
↓ 23 callers
Function
expect
(t *testing.T, a interface{}, b interface{})
src/lib/mandrill/mandrill_test.go:12
↓ 22 callers
Method
WriteHeader
WriteHeader writes the header and zeroes content length if set Content-Type should be set on all zero length responses.
src/lib/mux/middleware/gzip/gzip.go:75
↓ 21 callers
Method
Encode
Encode a given value in the session cookie.
src/lib/auth/session.go:186
↓ 21 callers
Function
Escape
Escape escapes HTML using HTMLEscapeString
src/lib/view/helpers/html.go:23
↓ 21 callers
Function
FindSubscription
FindSubscription fetches a single subscription record from the database by Subscriber id.
src/subscriptions/query.go:96
↓ 20 callers
Method
Layout
Layout sets the layout used
src/lib/view/render.go:102
↓ 20 callers
Function
ValidateInt
ValidateInt returns the int value of param or 0
src/lib/resource/validate.go:44
↓ 19 callers
Method
Create
Create inserts a new database record and returns the id or an error
src/lib/resource/query.go:33
↓ 19 callers
Function
Log
Log sends the key/value map to all registered loggers. If level is not set, it defaults to LevelInfo.
src/lib/server/log/log.go:71
↓ 19 callers
Method
MatchMethod
Match against URL
src/lib/mux/mux.go:21
↓ 19 callers
Function
Query
Query returns a new query for products with a default order.
src/products/query.go:167
↓ 17 callers
Function
AddUserSessionCookie
AddUserSessionCookie adds a new cookie for the given user on the incoming request, so that we can test authentication in handlers.
src/lib/resource/testing.go:59
↓ 17 callers
Method
Format
Format sets the format used, e.g. text/html,
src/lib/view/render.go:114
↓ 17 callers
Method
Header
Header sets a header on the Renderer's Writer (if set)
src/lib/view/render.go:132
↓ 17 callers
Method
Limit
Limit sets the sql LIMIT with an int
src/lib/query/query.go:516
↓ 17 callers
Method
putc
* action -- do something! What you do is determined by the argument: 1 Output A. Copy B to A. Get the next B. 2 Copy B to A. Get t
src/lib/assets/internal/jsmin/jsmin.go:187
↓ 16 callers
Function
FindAll
FindAll fetches all story records matching this query from the database.
src/products/query.go:143
↓ 16 callers
Method
Path
Return the template path
src/lib/view/parser/template.go:26
↓ 16 callers
Method
Source
Return the original template content
src/lib/view/parser/template.go:23
↓ 15 callers
Method
Count
Count fetches a count of model objects (executes SQL).
src/lib/query/query.go:266
↓ 14 callers
Function
Find
Find fetches a single user record from the database by id.
src/users/query.go:70
↓ 14 callers
Method
Header
Header returns the underlying writer header
src/lib/mux/middleware/gzip/gzip.go:81
↓ 14 callers
Function
PagesFind
(ID int64)
src/lib/query/query_test.go:91
↓ 14 callers
Function
Query
Query returns a new query for users with a default order.
src/users/query.go:98
↓ 14 callers
Function
TimeString
TimeString returns a string formatted as a time for this db if the database is nil, an empty string is returned.
src/lib/query/database.go:158
↓ 14 callers
Method
error
(s string)
src/lib/assets/internal/jsmin/jsmin.go:64
↓ 13 callers
Method
ShowURL
ShowURL returns the show url for this model /table/id
src/lib/resource/urls.go:28
↓ 13 callers
Method
action
(d int)
src/lib/assets/internal/jsmin/jsmin.go:191
↓ 13 callers
Method
reset
Clear sql/query caches
src/lib/query/query.go:678
↓ 12 callers
Function
ExecSQL
ExecSQL executes the given sql against our database with arbitrary args NB returns sql.Result - not to be used when rows expected
src/lib/query/database.go:148
↓ 12 callers
Method
Match
(string)
src/lib/mux/mux.go:23
↓ 12 callers
Method
Parse
Parse the URL for params according to pattern
src/lib/mux/mux.go:29
↓ 11 callers
Method
Add
Add appends these values to this key, without removing any other entries.
src/lib/mux/params.go:237
↓ 11 callers
Method
Context
Context sets the entire context for rendering
src/lib/view/render.go:165
↓ 11 callers
Function
Do
Do returns an error if this action is not allowed, or nil if it is allowed
src/lib/auth/can/can.go:41
↓ 11 callers
Method
FirstResult
FirstResult executes the SQL and returrns the first result
src/lib/query/query.go:320
↓ 11 callers
Method
Get
Retreive arbitrary data for this request
src/lib/server/schedule/schedule.go:21
↓ 11 callers
Function
PagesFindAll
(q *Query)
src/lib/query/query_test.go:99
↓ 11 callers
Function
ValidateTime
ValidateTime returns the time value of param or the zero value of time.Time
src/lib/resource/validate.go:121
↓ 10 callers
Function
New
New creates and initialises a new subscriptions instance.
src/subscriptions/query.go:55
↓ 10 callers
Function
NewRoute
NewRoute returns a new Route of our default type.
src/lib/mux/route.go:12
↓ 10 callers
Method
Open
Open and close
src/lib/query/adapters/database.go:14
↓ 10 callers
Method
Parse
Parse a template file
src/lib/view/parser/template.go:14
↓ 10 callers
Method
Results
Results returns an array of results
src/lib/query/query.go:389
↓ 9 callers
Method
Admin
Admin returns true if this user is an Admin.
src/users/role.go:47
↓ 9 callers
Function
FindAll
FindAll fetches all user records matching this query from the database.
src/users/query.go:79
↓ 9 callers
Function
FindPayment
FindPayment fetches a single subscription record from the database by PaymentIntent id.
src/subscriptions/query.go:84
↓ 9 callers
Function
New
New returns a new mux
src/lib/mux/mux.go:78
↓ 9 callers
Function
New
New builds a new Query, given the table and primary key
src/lib/query/query.go:54
↓ 9 callers
Function
RedirectExternal
RedirectExternal redirects setting the status code (for example unauthorized), but does no checks on the path Use with caution and only on paths *fixe
src/lib/server/redirects.go:37
↓ 9 callers
Method
Select
Select defines SELECT sql
src/lib/query/query.go:666
↓ 9 callers
Function
SendWebhook
SendWebhook sends a webhook to the specified URL with the given payload.
src/subscriptions/sendWebhook.go:15
↓ 9 callers
Method
WriteString
WriteString writes the string to the Writer.
src/lib/server/log/default.go:103
↓ 9 callers
Function
authenticityToken
()
src/app/assets/scripts/app.js:187
↓ 9 callers
Method
table
Ask model for table name to use
src/lib/query/query.go:727
↓ 8 callers
Function
Add
Add adds the given logger to the list of outputs, it should not be called from other goroutines.
src/lib/server/log/log.go:84
↓ 8 callers
Function
Authorise
Authorise adds this ability to the list of abilities for this role. Usage: can.Authorise(role.Admin, can.ManageResource, "pages")
src/lib/auth/can/ability.go:19
↓ 8 callers
Function
ConvertMapToVariables
ConvertMapToVariables converts a regular string/string map into the Variable struct e.g. `vars := ConvertMapToVariables(map[string]interface{}{"bob":
src/lib/mandrill/mandrill.go:339
↓ 8 callers
Method
Decode
Decode the value in the session cookie.
src/lib/auth/session.go:229
↓ 8 callers
Function
Query
Query returns a new query for subscriptions with a default order.
src/subscriptions/query.go:183
↓ 8 callers
Method
Query
(query string, args ...interface{})
src/lib/query/adapters/database.go:20
↓ 8 callers
Method
QuoteField
Quote Table and Column names
src/lib/query/adapters/database.go:32
↓ 8 callers
Function
updateRazorpaySubscription
(razorpayEventSubscriptionCompleted RazorpayEventSubscriptionCompleted, subscription *Subscription)
src/subscriptions/razorpayWebhook.go:623
↓ 7 callers
Function
AuthoriseOwner
AuthoriseOwner adds this ability to the list of abilities for this role for resources owned by this user. Usage: can.AuthoriseOwner(role.Reader, can.S
src/lib/auth/can/ability.go:27
next →
1–100 of 1,100, ranked by callers