publishing

package
v0.0.0-...-99a799c Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: GPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Success = 1
	Fail    = 0
)

Variables

This section is empty.

Functions

func MakeHttpHandler

func MakeHttpHandler(log kitlog.Logger, s Service) *mux.Router

func RegisterRPCService

func RegisterRPCService(log kitlog.Logger, repo rel.Repository)

Types

type Endpoints

type Endpoints struct {
	CreateAppEndpoint endpoint.Endpoint
	AppInfoEndpoint   endpoint.Endpoint
	RemoveAppEndpoint endpoint.Endpoint
	UpdateAppEndpoint endpoint.Endpoint
}

func MakeEndpoints

func MakeEndpoints(s Service) Endpoints

type RpcAppService

type RpcAppService struct {
	Repo rel.Repository

	Log kitlog.Logger
	// contains filtered or unexported fields
}

func (*RpcAppService) Delete

func (s *RpcAppService) Delete(ID *string, reply *int) error

func (*RpcAppService) FindByID

func (s *RpcAppService) FindByID(ID *int, reply *app.App) error

func (*RpcAppService) Insert

func (s *RpcAppService) Insert(args *app.App, reply *int) error

func (*RpcAppService) Update

func (s *RpcAppService) Update(args *app.App, reply *int) error

type Service

type Service interface {
	CreateApp(req *createAppRequest) (res *createAppResponse, err error)
	AppInfo(req *appInfoRequest) (res *appInfoResponse, err error)
	UpdateApp(req *updateAppRequest) (result *int, err error)
	RemoveApp(req *removeAppRequest) (result *int, err error)
}

func New

func New(log kitlog.Logger, config *viper.Viper) Service

Jump to

Keyboard shortcuts

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