server

package
v0.0.0-...-26386a0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticator

func Authenticator(auth *Auth, db *DatabaseSession) fiber.Handler

func CreateDatasetForm

func CreateDatasetForm(c *fiber.Ctx) error

func CreateOrganization

func CreateOrganization(db *DatabaseSession) fiber.Handler

func CreateOrganizationForm

func CreateOrganizationForm(c *fiber.Ctx) error

func DorothyRoot

func DorothyRoot() string

func GetOrganization

func GetOrganization(db *DatabaseSession) fiber.Handler

func GetOrganizations

func GetOrganizations(db *DatabaseSession) fiber.Handler

func Index

func Index(c *fiber.Ctx) error

func Login

func Login(jwtAuth *Auth, db *DatabaseSession) fiber.Handler

func LoginForm

func LoginForm(c *fiber.Ctx) error

func Logout

func Logout(c *fiber.Ctx) error

func Organization

func Organization(c *fiber.Ctx) error

func Redirect

func Redirect(c *fiber.Ctx, status int, path string, json any, text string) error

func Registration

func Registration(db *DatabaseSession) fiber.Handler

func RegistrationForm

func RegistrationForm(c *fiber.Ctx) error

func Verifier

func Verifier(auth *Auth) fiber.Handler

Types

type Auth

type Auth struct {
	*jwtauth.JWTAuth
}

func NewAuth

func NewAuth() (*Auth, error)

func (*Auth) MakeToken

func (auth *Auth) MakeToken(user *model.User) (string, error)

type DatabaseSession

type DatabaseSession struct {
	*gorm.DB
}

func NewDatabaseSession

func NewDatabaseSession(config *core.DatabaseConfig) (*DatabaseSession, error)

func (*DatabaseSession) CreateDataset

func (s *DatabaseSession) CreateDataset(newdata model.NewDataset, manifest *core.Manifest, user *model.User) error

func (*DatabaseSession) CreateUser

func (s *DatabaseSession) CreateUser(newuser *model.NewUser) error

func (*DatabaseSession) Initialize

func (s *DatabaseSession) Initialize() error

func (*DatabaseSession) ValidateCredentials

func (s *DatabaseSession) ValidateCredentials(email, password string) error

type Server

type Server struct {
	*fiber.App
	*core.Dorothy
	// contains filtered or unexported fields
}

func NewServer

func NewServer(global bool) (*Server, error)

func NewServerFromConfigFile

func NewServerFromConfigFile(filename string, noinherit, global bool) (*Server, error)

func NewServerFromDorothy

func NewServerFromDorothy(dorothy *core.Dorothy, global bool) (*Server, error)

func (*Server) CreateDataset

func (d *Server) CreateDataset(dataset model.NewDataset, authUser *model.User) error

func (*Server) CreateDatasetHandler

func (d *Server) CreateDatasetHandler() fiber.Handler

func (*Server) Dataset

func (d *Server) Dataset() fiber.Handler

func (*Server) GetDataset

func (d *Server) GetDataset() fiber.Handler

func (*Server) Listen

func (d *Server) Listen(host string, port int) error

func (*Server) ListenOnPort

func (d *Server) ListenOnPort(port int) error

func (*Server) RecieveDataset

func (d *Server) RecieveDataset() fiber.Handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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