model
package v1.5.1
Go to latest Published: Jun 20, 2023 License:MIT
Opens a new window with list of versions in this module.
Latest LatestThis package is not in the latest version of its module.
Opens a new window with license information.
Imports:13 Opens a new window with list of imports.
Imported by:0 Opens a new window with list of known importers.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- Constants
- Variables
- func CleanCollectionName(col string) string
- func EncryptExternalLogins(tokens map[string]OAuthConfig) ([]byte, error)
- type Account
- type Auth
- type Command
- type DatabaseConfig
- type ExecData
- type ExecHistory
- type File
- type JWTPayload
- type ListParams
- type Login
- type MetaMessage
- type OAuthConfig
- type PagedResult
- type Task
- type Tenant
- type UploadFileData
- type User
Constants¶
View Source
const (PlanFree =iotaPlanIdeaPleanLaunchPlanTractionPlanGrowth)
View Source
const (SystemID = "sb"MsgTypeError = "error"MsgTypeOk = "ok"MsgTypeEcho = "echo"MsgTypeInit = "init"MsgTypeAuth = "auth"MsgTypeToken = "token"MsgTypeJoin = "join"MsgTypeJoined = "joined"MsgTypePresence = "presence"MsgTypeChanIn = "chan_in"MsgTypeChanOut = "chan_out"MsgTypeDBCreated = "db_created"MsgTypeDBUpdated = "db_updated"MsgTypeDBDeleted = "db_deleted"MsgTypeFunctionCall = "fn_call"MsgTypeHTTPResponse = "http_response")
View Source
const (TaskTypeFunction = "function"TaskTypeMessage = "message"TaskTypeHTTP = "http")
Variables¶
View Source
var (HashSecret *jwt.HMACSHA)Functions¶
funcEncryptExternalLogins¶
func EncryptExternalLogins(tokens map[string]OAuthConfig) ([]byte,error)
Types¶
typeAuth¶
type Auth struct {AccountIDstring `json:"accountId"`UserIDstring `json:"userId"`Emailstring `json:"email"`Roleint `json:"role"`Tokenstring `json:"-"`Planint `json:"-"`}Auth represents an authenticated user.
func (Auth)ReconstructToken¶
typeCommand¶
typeDatabaseConfig¶
typeExecData¶
type ExecData struct {IDstring `json:"id"`AccountIDstring `json:"accountId"`FunctionNamestring `json:"name"`TriggerTopicstring `json:"trigger"`Codestring `json:"code"`Versionint `json:"version"`LastUpdatedtime.Time `json:"lastUpdated"`LastRuntime.Time `json:"lastRun"`History []ExecHistory `json:"history"`}ExecData represents a server-side function with its name, code and executionhistory
typeExecHistory¶
type ExecHistory struct {IDstring `json:"id"`FunctionIDstring `json:"functionId"`Versionint `json:"version"`Startedtime.Time `json:"started"`Completedtime.Time `json:"completed"`Successbool `json:"success"`Output []string `json:"output"`}ExecHistory represents a function run ending result
typeJWTPayload¶
JWTPayload contains the current user token
typeMetaMessage¶
typeOAuthConfig¶
typePagedResult¶
typeTenant¶
type Tenant struct {IDstring `bson:"_id" json:"id"`Emailstring `bson:"email" json:"email"`StripeIDstring `bson:"stripeId" json:"stripeId"`SubscriptionIDstring `bson:"subId" json:"subId"`Planint `json:"plan"`IsActivebool `bson:"active" json:"-"`MonthlyEmailSentint `bson:"mes" json:"-"`Createdtime.Time `bson:"created" json:"created"`ExternalLogins []byte `json:"-"`}func (*Tenant)GetExternalLogins¶
func (cus *Tenant) GetExternalLogins() (map[string]OAuthConfig,error)
func (*Tenant)GetProvider¶
func (cus *Tenant) GetProvider(providerstring) (cfgOAuthConfig, okbool)
typeUploadFileData¶
type UploadFileData struct {FileKeystringFileio.ReadSeeker} Click to show internal directories.
Click to hide internal directories.