v1

package
v0.0.0-...-0f89c16 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: BSD-3-Clause Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDatabase

func GetDatabase() (*ent.Client, error)

func NewValidate

func NewValidate() validate

func RunServer

func RunServer(srv Service, addr string) error

func RunServerWithTLS

func RunServerWithTLS(srv Service, addr string) error

Types

type Repository

type Repository interface {
	Create(ctx context.Context, u *userv1.CreateRequest) (*ent.User, error)
	Retrieve(ctx context.Context, id uint64) (*ent.User, error)
	Update(ctx context.Context, u *userv1.UpdateRequest) (*ent.User, error)
	Delete(ctx context.Context, id uint64) error
	List(ctx context.Context, in *userv1.ListRequest) ([]*ent.User, error)
	Login(ctx context.Context, in *userv1.UserLoginRequest) (*ent.User, error)
}

func NewRepoManager

func NewRepoManager(client *ent.Client) Repository

type Service

func NewService

func NewService(repo Repository, validator validate) Service

Directories

Path Synopsis
ent

Jump to

Keyboard shortcuts

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