Documentation ¶
Index ¶
- func RegisterUsersServer(s *grpc.Server, srv UsersServer)
- type JWT
- func (*JWT) Descriptor() ([]byte, []int)
- func (m *JWT) GetAud() string
- func (m *JWT) GetExp() *timestamp.Timestamp
- func (m *JWT) GetIat() *timestamp.Timestamp
- func (m *JWT) GetIss() string
- func (m *JWT) GetJti() string
- func (m *JWT) GetNbf() *timestamp.Timestamp
- func (m *JWT) GetSub() string
- func (m *JWT) GetToken() string
- func (*JWT) ProtoMessage()
- func (m *JWT) Reset()
- func (m *JWT) String() string
- func (m *JWT) XXX_DiscardUnknown()
- func (m *JWT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *JWT) XXX_Merge(src proto.Message)
- func (m *JWT) XXX_Size() int
- func (m *JWT) XXX_Unmarshal(b []byte) error
- type UnimplementedUsersServer
- func (*UnimplementedUsersServer) Authenticate(ctx context.Context, req *JWT) (*User, error)
- func (*UnimplementedUsersServer) Login(ctx context.Context, req *User) (*UserJWT, error)
- func (*UnimplementedUsersServer) Logout(ctx context.Context, req *JWT) (*empty.Empty, error)
- func (*UnimplementedUsersServer) Refresh(ctx context.Context, req *JWT) (*JWT, error)
- func (*UnimplementedUsersServer) Register(ctx context.Context, req *User) (*UserJWT, error)
- func (*UnimplementedUsersServer) Renew(ctx context.Context, req *JWT) (*JWT, error)
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetChangedAt() *timestamp.Timestamp
- func (m *User) GetCreatedAt() *timestamp.Timestamp
- func (m *User) GetEmail() string
- func (m *User) GetPassword() string
- func (m *User) GetUserUuid() string
- func (m *User) GetUsername() string
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
- type UserJWT
- func (*UserJWT) Descriptor() ([]byte, []int)
- func (m *UserJWT) GetAccess() *JWT
- func (m *UserJWT) GetRefresh() *JWT
- func (m *UserJWT) GetUser() *User
- func (*UserJWT) ProtoMessage()
- func (m *UserJWT) Reset()
- func (m *UserJWT) String() string
- func (m *UserJWT) XXX_DiscardUnknown()
- func (m *UserJWT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UserJWT) XXX_Merge(src proto.Message)
- func (m *UserJWT) XXX_Size() int
- func (m *UserJWT) XXX_Unmarshal(b []byte) error
- type UsersClient
- type UsersServer
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) ProtoMessage ¶
func (*JWT) ProtoMessage()
func (*JWT) XXX_DiscardUnknown ¶
func (m *JWT) XXX_DiscardUnknown()
func (*JWT) XXX_Unmarshal ¶
type UnimplementedUsersServer ¶
type UnimplementedUsersServer struct { }
UnimplementedUsersServer can be embedded to have forward compatible implementations.
func (*UnimplementedUsersServer) Authenticate ¶
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) GetChangedAt ¶
func (*User) GetCreatedAt ¶
func (*User) GetPassword ¶
func (*User) GetUserUuid ¶
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Unmarshal ¶
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) GetRefresh ¶
func (*UserJWT) ProtoMessage ¶
func (*UserJWT) ProtoMessage()
func (*UserJWT) XXX_DiscardUnknown ¶
func (m *UserJWT) XXX_DiscardUnknown()
func (*UserJWT) XXX_Marshal ¶
func (*UserJWT) XXX_Unmarshal ¶
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.
Click to show internal directories.
Click to hide internal directories.