Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
DB is the database helper and holds the session to db
func (*DB) CreateSlackClientsTable ¶
func (db *DB) CreateSlackClientsTable()
CreateSlackClientsTable syncs the slack_client table
func (*DB) CreateSlackSlugOrErr ¶
CreateSlackSlugOrErr inserts a new slack_slug into the db
func (*DB) GetSlackClientByTokenOrErr ¶
func (db *DB) GetSlackClientByTokenOrErr(token string) (SlackClient, error)
GetSlackClientByTokenOrErr attempts to fetch a slack_client by its token
func (*DB) GetSlackClientsOrErr ¶
func (db *DB) GetSlackClientsOrErr() ([]SlackClient, error)
GetSlackClientsOrErr retrieves all the slack_clients from db
type SlackClient ¶
type SlackClient struct { ID int `db:"id" json:"id"` Token string `db:"token" json:"-"` Host string `db:"host" json:"host"` VersionPath string `db:"version_path" json:"version_path"` Name string `db:"name" json:"name"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` // contains filtered or unexported fields }
SlackClient is the slack_clients db model definition
func (*SlackClient) GetSlugs ¶
func (s *SlackClient) GetSlugs() []SlackSlug
GetSlugs returns the slice of slugs for the slack_client
type SlackSlug ¶
type SlackSlug struct { ID int `db:"id" json:"id"` SlackClientID int `db:"slack_client_id" json:"slack_client_id"` Name string `db:"name" json:"name"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
SlackSlug is the model definition for slack_slugs table entries
Click to show internal directories.
Click to hide internal directories.