Documentation ¶
Index ¶
- func AddRoutes(e *gin.Engine, a Server)
- type RegistrationRequest
- type Server
- type ServerAgent
- func (a ServerAgent) AddPlaidItem(c *gin.Context)
- func (a ServerAgent) BackendAuthorizationMiddleware(c *gin.Context)
- func (a ServerAgent) FrontendAuthorizationMiddleware(c *gin.Context)
- func (a ServerAgent) GenericPlaidWebhook(c *gin.Context)
- func (a ServerAgent) GetAccounts(c *gin.Context)
- func (a ServerAgent) RegisterUser(c *gin.Context)
- func (a ServerAgent) ServeSPA(c *gin.Context)
- type WebhookCode
- type WebhookRequest
- type WebhookType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RegistrationRequest ¶
type RegistrationRequest struct { UserUUID string `json:"user_uuid" binding:"required"` Email string `json:"email" binding:"required"` }
RegistrationRequest encodes a single request for user registration
type Server ¶
type Server interface { // frontend ServeSPA(c *gin.Context) // user api AddPlaidItem(c *gin.Context) GetAccounts(c *gin.Context) // admin api RegisterUser(c *gin.Context) // plaid webhooks GenericPlaidWebhook(c *gin.Context) // authorization code BackendAuthorizationMiddleware(c *gin.Context) FrontendAuthorizationMiddleware(c *gin.Context) }
Server is the gin server interface for the public API
type ServerAgent ¶
type ServerAgent struct {
// contains filtered or unexported fields
}
ServerAgent implements Server
func NewServer ¶
func NewServer( logger tools.Logger, serviceDomain string, authMgr auth.AuthorizationManager, renderer views.Renderer, authorize auth.Getter, plaidClient plaidapi.Client, dbClient db.DB, ) ServerAgent
NewServer creates a new Server.
func (ServerAgent) AddPlaidItem ¶
func (a ServerAgent) AddPlaidItem(c *gin.Context)
AddPlaidItem adds all the accounts associated with this plaid item
func (ServerAgent) BackendAuthorizationMiddleware ¶
func (a ServerAgent) BackendAuthorizationMiddleware(c *gin.Context)
BackendAuthorizationMiddleware callback for the backend authorization middleware
func (ServerAgent) FrontendAuthorizationMiddleware ¶
func (a ServerAgent) FrontendAuthorizationMiddleware(c *gin.Context)
FrontendAuthorizationMiddleware callback for the frontend authorization middleware
func (ServerAgent) GenericPlaidWebhook ¶
func (a ServerAgent) GenericPlaidWebhook(c *gin.Context)
GenericPlaidWebhook accepts all Plaid webhook requests
func (ServerAgent) GetAccounts ¶
func (a ServerAgent) GetAccounts(c *gin.Context)
GetAccounts gets all the accounts
func (ServerAgent) RegisterUser ¶
func (a ServerAgent) RegisterUser(c *gin.Context)
RegisterUser adds all the accounts associated with this plaid item
func (ServerAgent) ServeSPA ¶
func (a ServerAgent) ServeSPA(c *gin.Context)
ServeSPA serves the single-page app
type WebhookCode ¶
type WebhookCode string
const ( InitialUpdate WebhookCode = "INITIAL_UPDATE" HistoricalUpdate WebhookCode = "HISTORICAL_UPDATE" DefaultUpdate WebhookCode = "DEFAULT_UPDATE" TransactionsRemoved WebhookCode = "TRANSACTIONS_REMOVED" ItemWebhookUpdateAcknowledged WebhookCode = "WEBHOOK_UPDATE_ACKNOWLEDGED" ItemError WebhookCode = "ERROR" )
func (WebhookCode) IsRemoval ¶
func (t WebhookCode) IsRemoval() bool
type WebhookRequest ¶
type WebhookRequest struct { Type WebhookType `json:"webhook_type"` Code WebhookCode `json:"webhook_code"` ItemID string `json:"item_id"` Error json.RawMessage `json:"error"` Newtransactions int `json:"new_transactions"` RemovedTransactions []string `json:"removed_transactions"` NewWebhookURL string `json:"new_webhook_url"` }
type WebhookType ¶
type WebhookType string
const ( ItemWebhookType WebhookType = "ITEM" TransactionsWebhookType WebhookType = "TRANSACTIONS" )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.