service

package
v0.0.0-...-412dc8c Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JWTIssuer = "github.com/nafutliikay/golang-webapp"
	JWTExpiry = 30 * 24 * time.Hour
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfigAutoMigrate

type AppConfigAutoMigrate bool

type AppConfigEnv

type AppConfigEnv string

type AppConfigImpl

type AppConfigImpl struct {
	// contains filtered or unexported fields
}

AppConfigImpl Implementation of the interfaces.AppConfig interface for application configuration.

func (AppConfigImpl) AutoMigrate

func (a AppConfigImpl) AutoMigrate() bool

func (AppConfigImpl) Env

func (a AppConfigImpl) Env() string

func (AppConfigImpl) Listen

func (AppConfigImpl) MySQL

type AppDaosImpl

type AppDaosImpl struct {
	// contains filtered or unexported fields
}

AppDaosImpl Implementation of the interfaces.AppDaos interface for exposing DAOs to the application.

func NewAppDaos

func NewAppDaos(users interfaces.UserDao) *AppDaosImpl

func (AppDaosImpl) Users

func (a AppDaosImpl) Users() interfaces.UserDao

type AppDaosParams

type AppDaosParams struct{}

type AppImpl

type AppImpl struct {
	// contains filtered or unexported fields
}

AppImpl Implementation of the interfaces.App for single point of entry to application.

func NewApp

func NewApp(cfg interfaces.AppConfig, db *gorm.DB, daos interfaces.AppDaos, svcs interfaces.AppServices,
	router *mux.Router, appLogger types.AppLogger, rootLogger types.RootLogger) *AppImpl

func (AppImpl) Config

func (a AppImpl) Config() interfaces.AppConfig

func (AppImpl) DB

func (a AppImpl) DB() *gorm.DB

func (AppImpl) Dao

func (a AppImpl) Dao() interfaces.AppDaos

func (AppImpl) Logger

func (a AppImpl) Logger() *zap.Logger

func (AppImpl) RootLogger

func (a AppImpl) RootLogger() *zap.Logger

func (AppImpl) Router

func (a AppImpl) Router() *mux.Router

func (AppImpl) Service

func (a AppImpl) Service() interfaces.AppServices

type AppParams

type AppParams struct{}

type AppServicesImpl

type AppServicesImpl struct {
	// contains filtered or unexported fields
}

AppServicesImpl Implementation of the interfaces.AppServices interface for exposing services to the application.

func (AppServicesImpl) JWT

func (AppServicesImpl) Login

type AppServicesParams

type AppServicesParams struct{}

type JWTServiceImpl

type JWTServiceImpl struct {
	// contains filtered or unexported fields
}

func NewJWTService

func NewJWTService(key types.JWTKey, logger types.JWTServiceLogger) (*JWTServiceImpl, error)

func (JWTServiceImpl) Generate

func (JWTServiceImpl) Validate

func (j JWTServiceImpl) Validate(encodedToken string) (interfaces.JWTValidateResult, error)

type LoginServiceImpl

type LoginServiceImpl struct {
	// contains filtered or unexported fields
}

func (LoginServiceImpl) Login

func (l LoginServiceImpl) Login(email, password string) (*interfaces.LoginResult, error)

Jump to

Keyboard shortcuts

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