token

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

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

Go to latest
Published: May 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(connStr string) (*sql.DB, error)

func NewHTTPHandler

func NewHTTPHandler(repository Repository) http.Handler

Types

type ActivationTokenInfo

type ActivationTokenInfo struct {
	UserID string `json:"user_id"`
	Token  string `json:"token"`
}

type Repository

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

func NewRepository

func NewRepository(db *sql.DB) Repository

type Server

type Server struct {
	pb.UnimplementedTokenServer
	Repository
}

func (Server) CreateActivationToken

func (s Server) CreateActivationToken(ctx context.Context, req *pb.CreateTokenRequest) (*pb.CreateTokenResponse, error)

func (Server) ValidateActivationToken

func (s Server) ValidateActivationToken(ctx context.Context, req *pb.ValidateTokenRequest) (*pb.ValidateTokenResponse, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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