account

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: MIT Imports: 20 Imported by: 0

README

account服务

介绍

这个服务是用户的账户服务,主要用来演示使用postgres,根据版本号升级对应的数据库变更记录

sql增量更新
  1. 系统版本查看 make next-version 下一个版本号
  2. 在当前项目sqlupdate目录下record.json文件中增加下一个版本号的sql变更记录,变更sql写到文件如:./sqlupdate/20190828_002.sql
{"version":"0.0.2","author":"xiaomeng79","file":"./sqlupdate/20190828_002.sql","date":"2019-08-28"}
  1. git 打标记 git tag 0.0.2
  2. 编译程序

详细实现在run.go下的execUpdateSQL方法

TODO
  • 逻辑订阅

Documentation

Index

Constants

View Source
const (
	SN = "srv-account" //  定义services名称
)

Variables

This section is empty.

Functions

func Run

func Run()

Types

type Account

type Account struct {
	Page utils.Page
	// contains filtered or unexported fields
}

func (*Account) Add

func (m *Account) Add(ctx context.Context) error

添加 ,返回id

func (*Account) QueryOne

func (m *Account) QueryOne(ctx context.Context) error

查询一个

func (*Account) Update

func (m *Account) Update(ctx context.Context) error

修改

type Server

type Server struct{}

func (*Server) AccountAdd

func (s *Server) AccountAdd(ctx context.Context, in *pb.AccountBase) (out *pb.AccountBase, outerr error)

func (*Server) AccountQueryOne

func (s *Server) AccountQueryOne(ctx context.Context, in *pb.AccountID) (out *pb.AccountBase, outerr error)

查询一个

func (*Server) AccountUpdate

func (s *Server) AccountUpdate(ctx context.Context, in *pb.AccountUpdateReq) (out *empty.Empty, outerr error)

Directories

Path Synopsis
Package account is a reverse proxy.
Package account is a reverse proxy.

Jump to

Keyboard shortcuts

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