config

package module
v0.0.0-...-c732954 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB_HANDLE     *gorm.DB
	EnvBot        *ModelEnvBot
	DATABASE_NAME = "owlly.db"
	SLACK_EVENT   = map[string]string{
		"update": "SLACK_UPDATE_EVENT",
		"delete": "SLACK_DELETE_EVENT",
	}
	AUTH_EVENT = map[string]string{
		"sign-up": "AUTH_SIGN_UP_EVENT",
		"sign-in": "AUTH_SIGN_IN_EVENT",
		"logout":  "AUTH_LOGOUT_EVENT",
	}
)

Functions

func ConnectDB

func ConnectDB() (bool, string)

==================================================================== // ========================= Init SQLite3 DB ========================== // ==================================================================== //

func New

func New(
	triggerName string,
	slackBotOauthToken string,
	slackChannelID string,
	slackUserID string,
	slackUserName string,
)

@dev get event values from front end and update config

Types

type ModelEmailUser

type ModelEmailUser struct {
	gorm.Model
	Email    string `gorm:"unique;not null" json:"email"`
	Password string `gorm:"not null"        json:"password"`
	Username string `gorm:"not null"        json:"username"`
}

type ModelEnvBot

type ModelEnvBot struct {
	gorm.Model
	TriggerName        string `gorm:"not null"        json:"triggerName"`
	SlackBotOauthToken string `gorm:"unique;not null" json:"slackBotOauthToken"`
	SlackChannelID     string `gorm:"not null"        json:"slackChannelID"`
	SlackUserID        string `gorm:"not null"        json:"slackUserID"`
	SlackUserName      string `gorm:"not null"        json:"slackUserName"`
}

type ModelWalletUser

type ModelWalletUser struct {
	gorm.Model
	PrivateKey string `gorm:"unique;not null" json:"privateKey"`
	AlchemyKey string `gorm:"unique;not null" json:"alchemyKey"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL