service

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAdminUser

func CreateAdminUser(username string, db *gorm.DB) (*models.User, error)

func CreateAgentUser

func CreateAgentUser(db *gorm.DB) (*models.User, error)

func CreateEndpoint

func CreateEndpoint(db *gorm.DB, ep EndpointInput) (models.Endpoint, error)

func CreateGuestUser

func CreateGuestUser(username string, db *gorm.DB) (*models.User, error)

func DeleteSettingByKey

func DeleteSettingByKey(key string, db *gorm.DB) error

func FirstAdmin

func FirstAdmin(db *gorm.DB) (*models.User, error)

func GetAgentToken

func GetAgentToken(db *gorm.DB) (string, error)

func GetSettingByKey

func GetSettingByKey(key string, db *gorm.DB) (*string, error)

func GetUserByToken

func GetUserByToken(token string, db *gorm.DB) (*models.User, error)

func SetSettingByKey

func SetSettingByKey(key string, value string, db *gorm.DB) error

Types

type EndpointInput

type EndpointInput struct {
	Method   string `json:"method"`
	Hostname string `json:"hostname"`
	Path     string `json:"path"`
}

Jump to

Keyboard shortcuts

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