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
↓ 7 callers
Function
Create
Create returns an error if this action is not authorised for this user
src/lib/auth/can/can.go:67
↓ 7 callers
Method
Fatal
Fatal logs the message, and then exits with status 1
src/lib/server/deprecated.go:39
↓ 7 callers
Method
Load
(request *http.Request)
src/lib/auth/session.go:50
↓ 7 callers
Method
Logf
Log a format and arguments
src/lib/server/schedule/schedule.go:27
↓ 7 callers
Method
MatchMaybe
(string)
src/lib/mux/mux.go:22
↓ 7 callers
Method
QueryString
QueryString builds a query string to use for results
src/lib/query/query.go:466
↓ 7 callers
Function
RandomToken
RandomToken generates a random token 32 bytes long, or at a specified length if arguments are provided.
src/lib/auth/random.go:11
↓ 7 callers
Function
RegisterHit
RegisterHit registers a hit and ups user count if required
src/lib/stats/stats.go:30
↓ 7 callers
Method
Render
Render to this writer
src/lib/view/parser/template.go:20
↓ 7 callers
Function
ValidateFloat
Methods for validating params passed from the database row as interface{} types perhaps this should be a sub-package for clarity? ValidateFloat return
src/lib/resource/validate.go:14
↓ 6 callers
Function
CentsToPrice
CentsToPrice converts a price in pence to a human friendly price including currency unit At present it assumes the currency is pounds, it should inste
src/lib/view/helpers/maths.go:58
↓ 6 callers
Function
CheckPassword
CheckPassword compares a password hashed with bcrypt.
src/lib/auth/auth.go:25
↓ 6 callers
Method
Delete
()
src/lib/mux/mux.go:35
↓ 6 callers
Function
Exec
Exec the given sql and args against the database directly Returning sql.Result (NB not rows)
src/lib/query/query.go:71
↓ 6 callers
Method
Exec
Execute queries with or without returned rows
src/lib/query/adapters/database.go:19
↓ 6 callers
Function
Fatal
Fatal sends the key/value map at level Fatal to all registered loggers, no other action is taken.
src/lib/server/log/log.go:58
↓ 6 callers
Function
GetMD5Hash
(text string)
src/lib/mailchimp/mailchimp.go:181
↓ 6 callers
Function
GetPaypalAuthorizationToken
GetPaypalAuthorizationToken fetches the bearer access token and returns it
src/subscriptions/paypal.go:331
↓ 6 callers
Method
Handler
Handler returns the handler to execute
src/lib/mux/mux.go:26
↓ 6 callers
Function
HexToBytes
HexToBytes converts a hex string representation of bytes to a byte representation
src/lib/auth/encode.go:14
↓ 6 callers
Function
Manage
The following are wrapper functions for can.Do to provide a more elegant interface i.e. calling can.Manage(u,r) Manage returns an error if all actions
src/lib/auth/can/can.go:62
↓ 6 callers
Method
Map
Map returns a flattened map of params with only one entry for each key, rather than the array of values Request params allow.
src/lib/mux/params.go:211
↓ 6 callers
Function
NewStdErr
NewStdErr returns a new StructuredLogger of type Default which writes to stderr. By default prefix is empty, and level is LevelDebug (the lowest), so
src/lib/server/log/default.go:25
↓ 6 callers
Function
PriceToCents
PriceToCents converts a price string in human friendly notation (£45 or £34.40) to a price in pence as an int64
src/lib/view/helpers/maths.go:23
↓ 6 callers
Method
Printf
(format string, args ...interface{})
src/lib/server/schedule/context.go:6
↓ 6 callers
Function
Session
Session loads the current sesions or returns a new blank session.
src/lib/auth/session.go:62
↓ 6 callers
Method
String
()
src/lib/view/render.go:44
↓ 6 callers
Function
Update
Update returns an error if this action is not authorised for this user
src/lib/auth/can/can.go:87
↓ 6 callers
Method
peek
* peek -- get the next character without getting it. */
src/lib/assets/internal/jsmin/jsmin.go:112
↓ 6 callers
Function
testTools
(code int, body string)
src/lib/mandrill/mandrill_test.go:24
↓ 6 callers
Function
updatePaypalSubscription
(paypalEventSubscription PaypalEventSubscription, subscription *Subscription)
src/subscriptions/paypalWebhook.go:602
↓ 5 callers
Method
AddMiddleware
AddMiddleware adds a middleware function, this should be done before starting the server as it remakes our chain of middleware. This prepends to our c
src/lib/mux/mux.go:192
↓ 5 callers
Function
AddToAudience
(audience Audience, list_id string, hash string, token string)
src/lib/mailchimp/mailchimp.go:61
↓ 5 callers
Function
CreateCountryMap
CreateCountryMap creates a map of countries given the country codes
src/products/actions/update.go:192
↓ 5 callers
Function
Date
Date returns a formatted date string given a time and optional format Date format layouts are for the date 2006-01-02
src/lib/view/helpers/helpers.go:155
↓ 5 callers
Function
Error
Error returns a new StatusError with code StatusInternalServerError and a generic message
src/lib/server/errors.go:77
↓ 5 callers
Function
HashPassword
HashPassword hashes a password with a random salt using bcrypt.
src/lib/auth/auth.go:30
↓ 5 callers
Method
IndexURL
IndexURL returns the index url for this model - /table
src/lib/resource/urls.go:8
↓ 5 callers
Function
NewWithColumns
NewWithColumns creates a new subscription instance and fills with data from the database cols provided.
src/subscriptions/query.go:32
↓ 5 callers
Method
Ping
()
src/lib/mandrill/mandrill.go:222
↓ 5 callers
Method
Set
Store arbitrary data for this request
src/lib/server/schedule/schedule.go:18
↓ 5 callers
Method
String
String returns a string represenation of this error, useful for debugging
src/lib/server/errors.go:26
↓ 5 callers
Function
Time
Time sends the key/value map to all registered loggers with an additional duration, start and end params set.
src/lib/server/log/log.go:64
↓ 5 callers
Method
ValidateParams
ValidateParams allows only those params by AllowedParams() to perform more sophisticated validation override it.
src/lib/resource/query.go:16
↓ 4 callers
Method
Anon
Anon returns true if this user is not a logged in user.
src/users/role.go:42
↓ 4 callers
Function
Base64ToBytes
Base64ToBytes converts from a b64 string to bytes
src/lib/auth/encode.go:28
↓ 4 callers
Function
BytesToBase64
BytesToBase64 converts bytes to a base64 string representation
src/lib/auth/encode.go:37
↓ 4 callers
Method
CacheKey
CacheKey sets the Cache-Control and Etag headers on the response using the CacheKey() from the Cacher passed in
src/lib/view/render.go:141
↓ 4 callers
Method
CacheKey
Return the cache key
src/lib/view/parser/template.go:29
↓ 4 callers
Method
Compile
Compile compiles all our files and calculates hashes from their contents The group hash is a hash of hashes
src/lib/assets/group.go:91
↓ 4 callers
Method
Copy
Copy returns a new copy of this query which can be mutated without affecting the original
src/lib/query/query.go:84
↓ 4 callers
Function
Destroy
Destroy returns an error if this action is not authorised for this user
src/lib/auth/can/can.go:92
↓ 4 callers
Method
Destroy
Destroy deletes this resource by removing the database record.
src/lib/resource/query.go:56
↓ 4 callers
Function
GeneratePresignedUrl
GeneratePresignedUrl generates the url for download from the S3
src/lib/s3/url.go:15
↓ 4 callers
Method
Len
()
src/lib/assets/group.go:18
↓ 4 callers
Method
LevelValue
LevelValue extracts the Level from values (if present) or returns 0 if not.
src/lib/server/log/default.go:108
↓ 4 callers
Function
LoadTemplatesAtPaths
LoadTemplatesAtPaths loads our templates given the paths provided
src/lib/view/view.go:120
↓ 4 callers
Method
MessagesSend
MessagesSend sends a message via an API client
src/lib/mandrill/mandrill.go:239
↓ 4 callers
Method
Method
Method sets the method exclusively to method
src/lib/mux/route.go:116
↓ 4 callers
Function
New
New creates and initialises a new user instance.
src/users/query.go:49
↓ 4 callers
Function
New
New returns a new config, which defaults to development
src/lib/server/config/config.go:37
↓ 4 callers
Function
New
New creates and initialises a new story instance.
src/products/query.go:91
↓ 4 callers
Method
Offset
Offset sets the sql OFFSET with an int
src/lib/query/query.go:523
↓ 4 callers
Function
OpenDatabase
OpenDatabase opens the database with the given options
src/lib/query/database.go:30
↓ 4 callers
Method
Result
Result executes the query against the database, returning sql.Result, and error (no rows) (Executes SQL)
src/lib/query/query.go:307
↓ 4 callers
Method
Save
(http.ResponseWriter)
src/lib/auth/session.go:51
↓ 4 callers
Method
SelectValue
()
src/lib/view/helpers/forms.go:99
↓ 4 callers
Function
SessionGet
SessionGet loads the current session (if any)
src/lib/auth/session.go:73
↓ 4 callers
Method
Set
Set sets this key to these values, removing any other entries.
src/lib/mux/params.go:222
↓ 4 callers
Function
SetDefault
SetDefault sets the default mux on the package for use in parsing params we could instead decorate each request with a reference to the Route but this
src/lib/mux/mux.go:50
↓ 4 callers
Function
SetupTestDatabase
SetupTestDatabase sets up the database for all tests from the test config.
src/lib/resource/testing.go:114
↓ 4 callers
Function
UserCount
UserCount returns a count of users in the last 5 minutes
src/lib/stats/stats.go:123
↓ 4 callers
Function
ValidateBoolean
ValidateBoolean returns the bool value of param or false
src/lib/resource/validate.go:32
↓ 4 callers
Function
applyColor
Format a string by wrapping in a given color code
src/lib/mux/middleware/logrequest/middleware.go:138
↓ 4 callers
Function
buildRedirectURL
buildRedirectURL constructs a properly formatted redirect URL by appending parameters It handles existing query strings and sanitizes multiple ? into
src/subscriptions/success.go:27
↓ 4 callers
Function
isAlphanum
* isAlphanum -- return true if the character is a letter, digit, underscore, dollar sign, or non-ASCII character. */
src/lib/assets/internal/jsmin/jsmin.go:73
↓ 4 callers
Function
paymentScriptType
()
src/app/assets/scripts/app.js:286
↓ 4 callers
Method
pk
Ask model for primary key name to use
src/lib/query/query.go:722
↓ 4 callers
Function
productsModTimes
storiesModTime returns the mod time of the first story, or current time if no stories
src/products/actions/index.go:117
↓ 4 callers
Function
randomKey
Generate a random 32 byte key encoded in base64
src/app/bootstrap.go:168
↓ 4 callers
Method
setupFromArgs
(args ...string)
src/lib/server/errors.go:37
↓ 3 callers
Function
AllowedParams
AllowedParams returns an array of acceptable params in update
src/users/query.go:22
↓ 3 callers
Function
AllowedParams
AllowedParams returns the cols editable by everyone
src/products/query.go:24
↓ 3 callers
Function
AuthenticityTokenWithSecret
AuthenticityTokenWithSecret generates a new authenticity token from the secret by xoring a new random token with it and prepending the random bytes Se
src/lib/auth/auth.go:141
↓ 3 callers
Function
CheckAuthenticityToken
CheckAuthenticityToken checks the token against that stored in a session cookie, and returns an error if the check fails.
src/lib/auth/auth.go:80
↓ 3 callers
Function
CheckAuthenticityTokenWithSecret
CheckAuthenticityTokenWithSecret checks an auth token against a secret.
src/lib/auth/auth.go:118
↓ 3 callers
Function
ClientWithKey
ClientWithKey returns a mandrill.Client pointer armed with the supplied Mandrill API key For integration testing, you can supply `SANDBOX_SUCCESS` or
src/lib/mandrill/mandrill.go:214
↓ 3 callers
Method
Config
Config returns a specific configuration value or "" if no value
src/lib/server/deprecated.go:86
↓ 3 callers
Method
Config
(string)
src/lib/server/schedule/context.go:12
↓ 3 callers
Method
Copy
Copy our bytes to dstpath
src/lib/assets/file.go:89
↓ 3 callers
Function
Debug
Debug sends the key/value map at level Debug to all registered (log)gers.
src/lib/server/log/log.go:39
↓ 3 callers
Function
Decrypt
Decrypt decrypts data using 256-bit AES-GCM. This both hides the content of the data and provides a check that it hasn't been altered. Expects input
src/lib/auth/encrypt.go:53
↓ 3 callers
Method
DeleteAll
DeleteAll delets *all* models specified in this relation
src/lib/query/query.go:251
↓ 3 callers
Method
File
File returns the first asset file matching name - this assumes files have unique names between groups
src/lib/assets/assets.go:35
↓ 3 callers
Method
FileLine
FileLine returns file name and line of error
src/lib/server/errors.go:31
↓ 3 callers
Function
FindAll
FindAll fetches all subscription records matching this query from the database.
src/subscriptions/query.go:130
↓ 3 callers
Method
Flush
()
src/lib/mux/middleware/gzip/gzip.go:98
↓ 3 callers
Method
Get
Get returns the first value for this key or a blank string if no entry.
src/lib/mux/params.go:253
↓ 3 callers
Method
Get
(string)
src/lib/auth/session.go:48
↓ 3 callers
Method
Get
Get returns a specific value or "" if no value
src/lib/server/config/config.go:82
← previous
next →
101–200 of 1,100, ranked by callers