Documentation
¶
Overview ¶
Package org_dakstudios_srv_auth_auth is a generated protocol buffer package.
It is generated from these files:
proto/auth/auth.proto
It has these top-level messages:
Token AuthenticateRequest AuthenticateResponse AuthorizeRequest AuthorizeResponse
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAuthHandler ¶
func RegisterAuthHandler(s server.Server, hdlr AuthHandler, opts ...server.HandlerOption)
Types ¶
type Auth ¶
type Auth struct {
AuthHandler
}
func (*Auth) Authenticate ¶
func (h *Auth) Authenticate(ctx context.Context, in *AuthenticateRequest, out *AuthenticateResponse) error
func (*Auth) Authorize ¶
func (h *Auth) Authorize(ctx context.Context, in *AuthorizeRequest, out *AuthorizeResponse) error
type AuthClient ¶
type AuthClient interface { Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...client.CallOption) (*AuthenticateResponse, error) Authorize(ctx context.Context, in *AuthorizeRequest, opts ...client.CallOption) (*AuthorizeResponse, error) }
func NewAuthClient ¶
func NewAuthClient(serviceName string, c client.Client) AuthClient
type AuthHandler ¶
type AuthHandler interface { Authenticate(context.Context, *AuthenticateRequest, *AuthenticateResponse) error Authorize(context.Context, *AuthorizeRequest, *AuthorizeResponse) error }
type AuthenticateRequest ¶
type AuthenticateRequest struct { // user email Email string `protobuf:"bytes,1,opt,name=email" json:"email,omitempty"` // user password Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"` }
func (*AuthenticateRequest) Descriptor ¶
func (*AuthenticateRequest) Descriptor() ([]byte, []int)
func (*AuthenticateRequest) GetEmail ¶
func (m *AuthenticateRequest) GetEmail() string
func (*AuthenticateRequest) GetPassword ¶
func (m *AuthenticateRequest) GetPassword() string
func (*AuthenticateRequest) ProtoMessage ¶
func (*AuthenticateRequest) ProtoMessage()
func (*AuthenticateRequest) Reset ¶
func (m *AuthenticateRequest) Reset()
func (*AuthenticateRequest) String ¶
func (m *AuthenticateRequest) String() string
type AuthenticateResponse ¶
type AuthenticateResponse struct { // jwt token Token *Token `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` }
func (*AuthenticateResponse) Descriptor ¶
func (*AuthenticateResponse) Descriptor() ([]byte, []int)
func (*AuthenticateResponse) GetToken ¶
func (m *AuthenticateResponse) GetToken() *Token
func (*AuthenticateResponse) ProtoMessage ¶
func (*AuthenticateResponse) ProtoMessage()
func (*AuthenticateResponse) Reset ¶
func (m *AuthenticateResponse) Reset()
func (*AuthenticateResponse) String ¶
func (m *AuthenticateResponse) String() string
type AuthorizeRequest ¶
type AuthorizeRequest struct { // jwt token Token *Token `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` // permission Permission string `protobuf:"bytes,2,opt,name=permission" json:"permission,omitempty"` }
func (*AuthorizeRequest) Descriptor ¶
func (*AuthorizeRequest) Descriptor() ([]byte, []int)
func (*AuthorizeRequest) GetPermission ¶
func (m *AuthorizeRequest) GetPermission() string
func (*AuthorizeRequest) GetToken ¶
func (m *AuthorizeRequest) GetToken() *Token
func (*AuthorizeRequest) ProtoMessage ¶
func (*AuthorizeRequest) ProtoMessage()
func (*AuthorizeRequest) Reset ¶
func (m *AuthorizeRequest) Reset()
func (*AuthorizeRequest) String ¶
func (m *AuthorizeRequest) String() string
type AuthorizeResponse ¶
type AuthorizeResponse struct { // true if user authorized for the action Authorized bool `protobuf:"varint,1,opt,name=authorized" json:"authorized,omitempty"` }
func (*AuthorizeResponse) Descriptor ¶
func (*AuthorizeResponse) Descriptor() ([]byte, []int)
func (*AuthorizeResponse) GetAuthorized ¶
func (m *AuthorizeResponse) GetAuthorized() bool
func (*AuthorizeResponse) ProtoMessage ¶
func (*AuthorizeResponse) ProtoMessage()
func (*AuthorizeResponse) Reset ¶
func (m *AuthorizeResponse) Reset()
func (*AuthorizeResponse) String ¶
func (m *AuthorizeResponse) String() string
type Token ¶
type Token struct { // jwt token Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` }
func (*Token) Descriptor ¶
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.