dumpexample

package module
v0.0.0-...-9457473 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUsersServer

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

Types

type JWT

type JWT struct {
	Token                string               `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Iss                  string               `protobuf:"bytes,2,opt,name=iss,proto3" json:"iss,omitempty"`
	Sub                  string               `protobuf:"bytes,3,opt,name=sub,proto3" json:"sub,omitempty"`
	Aud                  string               `protobuf:"bytes,4,opt,name=aud,proto3" json:"aud,omitempty"`
	Exp                  *timestamp.Timestamp `protobuf:"bytes,5,opt,name=exp,proto3" json:"exp,omitempty"`
	Nbf                  *timestamp.Timestamp `protobuf:"bytes,6,opt,name=nbf,proto3" json:"nbf,omitempty"`
	Iat                  *timestamp.Timestamp `protobuf:"bytes,7,opt,name=iat,proto3" json:"iat,omitempty"`
	Jti                  string               `protobuf:"bytes,8,opt,name=jti,proto3" json:"jti,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

JWT message type

func (*JWT) Descriptor

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

func (*JWT) GetAud

func (m *JWT) GetAud() string

func (*JWT) GetExp

func (m *JWT) GetExp() *timestamp.Timestamp

func (*JWT) GetIat

func (m *JWT) GetIat() *timestamp.Timestamp

func (*JWT) GetIss

func (m *JWT) GetIss() string

func (*JWT) GetJti

func (m *JWT) GetJti() string

func (*JWT) GetNbf

func (m *JWT) GetNbf() *timestamp.Timestamp

func (*JWT) GetSub

func (m *JWT) GetSub() string

func (*JWT) GetToken

func (m *JWT) GetToken() string

func (*JWT) ProtoMessage

func (*JWT) ProtoMessage()

func (*JWT) Reset

func (m *JWT) Reset()

func (*JWT) String

func (m *JWT) String() string

func (*JWT) XXX_DiscardUnknown

func (m *JWT) XXX_DiscardUnknown()

func (*JWT) XXX_Marshal

func (m *JWT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JWT) XXX_Merge

func (m *JWT) XXX_Merge(src proto.Message)

func (*JWT) XXX_Size

func (m *JWT) XXX_Size() int

func (*JWT) XXX_Unmarshal

func (m *JWT) XXX_Unmarshal(b []byte) error

type UnimplementedUsersServer

type UnimplementedUsersServer struct {
}

UnimplementedUsersServer can be embedded to have forward compatible implementations.

func (*UnimplementedUsersServer) Authenticate

func (*UnimplementedUsersServer) Authenticate(ctx context.Context, req *JWT) (*User, error)

func (*UnimplementedUsersServer) Login

func (*UnimplementedUsersServer) Login(ctx context.Context, req *User) (*UserJWT, error)

func (*UnimplementedUsersServer) Logout

func (*UnimplementedUsersServer) Logout(ctx context.Context, req *JWT) (*empty.Empty, error)

func (*UnimplementedUsersServer) Refresh

func (*UnimplementedUsersServer) Refresh(ctx context.Context, req *JWT) (*JWT, error)

func (*UnimplementedUsersServer) Register

func (*UnimplementedUsersServer) Register(ctx context.Context, req *User) (*UserJWT, error)

func (*UnimplementedUsersServer) Renew

func (*UnimplementedUsersServer) Renew(ctx context.Context, req *JWT) (*JWT, error)

type User

type User struct {
	UserUuid             string               `protobuf:"bytes,1,opt,name=user_uuid,json=userUuid,proto3" json:"user_uuid,omitempty"`
	Email                string               `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Username             string               `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	CreatedAt            *timestamp.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	Password             string               `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"`
	ChangedAt            *timestamp.Timestamp `protobuf:"bytes,6,opt,name=changed_at,json=changedAt,proto3" json:"changed_at,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

User message type

func (*User) Descriptor

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

func (*User) GetChangedAt

func (m *User) GetChangedAt() *timestamp.Timestamp

func (*User) GetCreatedAt

func (m *User) GetCreatedAt() *timestamp.Timestamp

func (*User) GetEmail

func (m *User) GetEmail() string

func (*User) GetPassword

func (m *User) GetPassword() string

func (*User) GetUserUuid

func (m *User) GetUserUuid() string

func (*User) GetUsername

func (m *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

func (*User) XXX_DiscardUnknown

func (m *User) XXX_DiscardUnknown()

func (*User) XXX_Marshal

func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*User) XXX_Merge

func (m *User) XXX_Merge(src proto.Message)

func (*User) XXX_Size

func (m *User) XXX_Size() int

func (*User) XXX_Unmarshal

func (m *User) XXX_Unmarshal(b []byte) error

type UserJWT

type UserJWT struct {
	User                 *User    `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	Refresh              *JWT     `protobuf:"bytes,2,opt,name=refresh,proto3" json:"refresh,omitempty"`
	Access               *JWT     `protobuf:"bytes,3,opt,name=access,proto3" json:"access,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

User JWT message type

func (*UserJWT) Descriptor

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

func (*UserJWT) GetAccess

func (m *UserJWT) GetAccess() *JWT

func (*UserJWT) GetRefresh

func (m *UserJWT) GetRefresh() *JWT

func (*UserJWT) GetUser

func (m *UserJWT) GetUser() *User

func (*UserJWT) ProtoMessage

func (*UserJWT) ProtoMessage()

func (*UserJWT) Reset

func (m *UserJWT) Reset()

func (*UserJWT) String

func (m *UserJWT) String() string

func (*UserJWT) XXX_DiscardUnknown

func (m *UserJWT) XXX_DiscardUnknown()

func (*UserJWT) XXX_Marshal

func (m *UserJWT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserJWT) XXX_Merge

func (m *UserJWT) XXX_Merge(src proto.Message)

func (*UserJWT) XXX_Size

func (m *UserJWT) XXX_Size() int

func (*UserJWT) XXX_Unmarshal

func (m *UserJWT) XXX_Unmarshal(b []byte) error

type UsersClient

type UsersClient interface {
	// Creates a new user
	Register(ctx context.Context, in *User, opts ...grpc.CallOption) (*UserJWT, error)
	// Logins a user
	Login(ctx context.Context, in *User, opts ...grpc.CallOption) (*UserJWT, error)
	// Logouts a user
	Logout(ctx context.Context, in *JWT, opts ...grpc.CallOption) (*empty.Empty, error)
	// Authenticates a user given an access token
	Authenticate(ctx context.Context, in *JWT, opts ...grpc.CallOption) (*User, error)
	// Refresh an access token
	Refresh(ctx context.Context, in *JWT, opts ...grpc.CallOption) (*JWT, error)
	// Renews a refresh token
	Renew(ctx context.Context, in *JWT, opts ...grpc.CallOption) (*JWT, error)
}

UsersClient is the client API for Users service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewUsersClient

func NewUsersClient(cc *grpc.ClientConn) UsersClient

type UsersServer

type UsersServer interface {
	// Creates a new user
	Register(context.Context, *User) (*UserJWT, error)
	// Logins a user
	Login(context.Context, *User) (*UserJWT, error)
	// Logouts a user
	Logout(context.Context, *JWT) (*empty.Empty, error)
	// Authenticates a user given an access token
	Authenticate(context.Context, *JWT) (*User, error)
	// Refresh an access token
	Refresh(context.Context, *JWT) (*JWT, error)
	// Renews a refresh token
	Renew(context.Context, *JWT) (*JWT, error)
}

UsersServer is the server API for Users service.

Jump to

Keyboard shortcuts

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