users

package
v0.0.0-...-f1b8dfb Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2017 License: Unlicense Imports: 7 Imported by: 8

Documentation

Overview

Package users is a generated protocol buffer package.

It is generated from these files:

users.proto

It has these top-level messages:

User
UserInfo
TrelloInfo

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUsersServer

func RegisterUsersServer(s *grpc.Server, srv UsersServer)

Types

type TrelloInfo

type TrelloInfo struct {
	ID         string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
	AvatarHas  string `protobuf:"bytes,2,opt,name=AvatarHas" json:"AvatarHas,omitempty"`
	FullName   string `protobuf:"bytes,3,opt,name=FullName" json:"FullName,omitempty"`
	Initials   string `protobuf:"bytes,4,opt,name=Initials" json:"Initials,omitempty"`
	Username   string `protobuf:"bytes,5,opt,name=Username" json:"Username,omitempty"`
	WebhookURL string `protobuf:"bytes,6,opt,name=WebhookURL" json:"WebhookURL,omitempty"`
}

TrelloInfo comes from trello, this information is used by [`ambition-rello`](https://github.com/adamryman/ambition-rello)

func (*TrelloInfo) Descriptor

func (*TrelloInfo) Descriptor() ([]byte, []int)

func (*TrelloInfo) GetAvatarHas

func (m *TrelloInfo) GetAvatarHas() string

func (*TrelloInfo) GetFullName

func (m *TrelloInfo) GetFullName() string

func (*TrelloInfo) GetID

func (m *TrelloInfo) GetID() string

func (*TrelloInfo) GetInitials

func (m *TrelloInfo) GetInitials() string

func (*TrelloInfo) GetUsername

func (m *TrelloInfo) GetUsername() string

func (*TrelloInfo) GetWebhookURL

func (m *TrelloInfo) GetWebhookURL() string

func (*TrelloInfo) ProtoMessage

func (*TrelloInfo) ProtoMessage()

func (*TrelloInfo) Reset

func (m *TrelloInfo) Reset()

func (*TrelloInfo) String

func (m *TrelloInfo) String() string

type User

type User struct {
	// ID = 0 for create
	// Id is immutable
	ID     int64       `protobuf:"varint,1,opt,name=ID" json:"ID,omitempty"`
	Info   *UserInfo   `protobuf:"bytes,2,opt,name=Info" json:"Info,omitempty"`
	Trello *TrelloInfo `protobuf:"bytes,9,opt,name=Trello" json:"Trello,omitempty"`
}

func (*User) Descriptor

func (*User) Descriptor() ([]byte, []int)

func (*User) GetID

func (m *User) GetID() int64

func (*User) GetInfo

func (m *User) GetInfo() *UserInfo

func (*User) GetTrello

func (m *User) GetTrello() *TrelloInfo

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

type UserInfo

type UserInfo struct {
	Username string `protobuf:"bytes,1,opt,name=Username" json:"Username,omitempty"`
	Email    string `protobuf:"bytes,2,opt,name=Email" json:"Email,omitempty"`
	Hash     string `protobuf:"bytes,3,opt,name=Hash" json:"Hash,omitempty"`
	Salt     string `protobuf:"bytes,4,opt,name=Salt" json:"Salt,omitempty"`
}

func (*UserInfo) Descriptor

func (*UserInfo) Descriptor() ([]byte, []int)

func (*UserInfo) GetEmail

func (m *UserInfo) GetEmail() string

func (*UserInfo) GetHash

func (m *UserInfo) GetHash() string

func (*UserInfo) GetSalt

func (m *UserInfo) GetSalt() string

func (*UserInfo) GetUsername

func (m *UserInfo) GetUsername() string

func (*UserInfo) ProtoMessage

func (*UserInfo) ProtoMessage()

func (*UserInfo) Reset

func (m *UserInfo) Reset()

func (*UserInfo) String

func (m *UserInfo) String() string

type UsersClient

type UsersClient interface {
	// Create takes information about a user and creates an entry
	// It returns that User with it's ID populated
	CreateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error)
	// ReadUser takes some information about a user and tries to find the
	// user with that information
	// Accepted values: ID, Info.Username, Info.email, and Trello.ID
	ReadUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error)
	// UpdateUser requires an ID, which can be obttained from ReadUser.
	// All other non-zerp values will be updated
	UpdateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error)
	// DeleteUser requires an ID, as a Read before a delete is a good idea.
	// It will return User with just thre requested ID on success
	DeleteUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error)
}

func NewUsersClient

func NewUsersClient(cc *grpc.ClientConn) UsersClient

type UsersServer

type UsersServer interface {
	// Create takes information about a user and creates an entry
	// It returns that User with it's ID populated
	CreateUser(newcontext.Context, *User) (*User, error)
	// ReadUser takes some information about a user and tries to find the
	// user with that information
	// Accepted values: ID, Info.Username, Info.email, and Trello.ID
	ReadUser(newcontext.Context, *User) (*User, error)
	// UpdateUser requires an ID, which can be obttained from ReadUser.
	// All other non-zerp values will be updated
	UpdateUser(newcontext.Context, *User) (*User, error)
	// DeleteUser requires an ID, as a Read before a delete is a good idea.
	// It will return User with just thre requested ID on success
	DeleteUser(newcontext.Context, *User) (*User, error)
}

Directories

Path Synopsis
cmd
svc
client/grpc
Package grpc provides a gRPC client for the Users service.
Package grpc provides a gRPC client for the Users service.
client/http
Package http provides an HTTP client for the Users service.
Package http provides an HTTP client for the Users service.

Jump to

Keyboard shortcuts

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