usersvc

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2018 License: MIT Imports: 1 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	Id   string
	Text string
}

type User

type User struct {
	Id       string
	Name     string
	Gender   int
	Comments []Comment
}

type UserService

type UserService interface {
	CreateUser(ctx context.Context, user User) (id string, err error)
	UpdateUser(ctx context.Context, user User) (err error)
	GetUser(ctx context.Context, id string) (user User, err error)
	FindUsers(ctx context.Context) (results map[string]User, err error)
	CreateComment(ctx context.Context, comment Comment) (id string, err error)
	GetComment(ctx context.Context, id string) (comment Comment, err error)
	GetUserComments(ctx context.Context, userId string) (list []Comment, err error)
}

@microgen middleware, logging, grpc, http, recovering, error-logging, tracing, caching, metrics @protobuf github.com/devimteam/microgen/examples/protobuf

Jump to

Keyboard shortcuts

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