Documentation ¶
Overview ¶
Package auth is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterAuthHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAuthHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthClient) error
- func RegisterAuthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServer) error
- func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
- type AuthClient
- type AuthExchangeRequest
- func (*AuthExchangeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AuthExchangeRequest) GetCode() string
- func (*AuthExchangeRequest) ProtoMessage()
- func (x *AuthExchangeRequest) ProtoReflect() protoreflect.Message
- func (x *AuthExchangeRequest) Reset()
- func (x *AuthExchangeRequest) String() string
- func (m *AuthExchangeRequest) Validate() error
- func (m *AuthExchangeRequest) ValidateAll() error
- type AuthExchangeRequestMultiError
- type AuthExchangeRequestValidationError
- func (e AuthExchangeRequestValidationError) Cause() error
- func (e AuthExchangeRequestValidationError) Error() string
- func (e AuthExchangeRequestValidationError) ErrorName() string
- func (e AuthExchangeRequestValidationError) Field() string
- func (e AuthExchangeRequestValidationError) Key() bool
- func (e AuthExchangeRequestValidationError) Reason() string
- type AuthExchangeResponse
- func (*AuthExchangeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AuthExchangeResponse) GetExpiresIn() int64
- func (x *AuthExchangeResponse) GetToken() string
- func (*AuthExchangeResponse) ProtoMessage()
- func (x *AuthExchangeResponse) ProtoReflect() protoreflect.Message
- func (x *AuthExchangeResponse) Reset()
- func (x *AuthExchangeResponse) String() string
- func (m *AuthExchangeResponse) Validate() error
- func (m *AuthExchangeResponse) ValidateAll() error
- type AuthExchangeResponseMultiError
- type AuthExchangeResponseValidationError
- func (e AuthExchangeResponseValidationError) Cause() error
- func (e AuthExchangeResponseValidationError) Error() string
- func (e AuthExchangeResponseValidationError) ErrorName() string
- func (e AuthExchangeResponseValidationError) Field() string
- func (e AuthExchangeResponseValidationError) Key() bool
- func (e AuthExchangeResponseValidationError) Reason() string
- type AuthInfoRequest
- func (*AuthInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (*AuthInfoRequest) ProtoMessage()
- func (x *AuthInfoRequest) ProtoReflect() protoreflect.Message
- func (x *AuthInfoRequest) Reset()
- func (x *AuthInfoRequest) String() string
- func (m *AuthInfoRequest) Validate() error
- func (m *AuthInfoRequest) ValidateAll() error
- type AuthInfoRequestMultiError
- type AuthInfoRequestValidationError
- func (e AuthInfoRequestValidationError) Cause() error
- func (e AuthInfoRequestValidationError) Error() string
- func (e AuthInfoRequestValidationError) ErrorName() string
- func (e AuthInfoRequestValidationError) Field() string
- func (e AuthInfoRequestValidationError) Key() bool
- func (e AuthInfoRequestValidationError) Reason() string
- type AuthInfoResponse
- func (*AuthInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AuthInfoResponse) GetAvatar() string
- func (x *AuthInfoResponse) GetEmail() string
- func (x *AuthInfoResponse) GetId() string
- func (x *AuthInfoResponse) GetLogoutUrl() string
- func (x *AuthInfoResponse) GetName() string
- func (x *AuthInfoResponse) GetRoles() []string
- func (*AuthInfoResponse) ProtoMessage()
- func (x *AuthInfoResponse) ProtoReflect() protoreflect.Message
- func (x *AuthInfoResponse) Reset()
- func (x *AuthInfoResponse) String() string
- func (m *AuthInfoResponse) Validate() error
- func (m *AuthInfoResponse) ValidateAll() error
- type AuthInfoResponseMultiError
- type AuthInfoResponseValidationError
- func (e AuthInfoResponseValidationError) Cause() error
- func (e AuthInfoResponseValidationError) Error() string
- func (e AuthInfoResponseValidationError) ErrorName() string
- func (e AuthInfoResponseValidationError) Field() string
- func (e AuthInfoResponseValidationError) Key() bool
- func (e AuthInfoResponseValidationError) Reason() string
- type AuthLoginRequest
- func (*AuthLoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AuthLoginRequest) GetPassword() string
- func (x *AuthLoginRequest) GetUsername() string
- func (*AuthLoginRequest) ProtoMessage()
- func (x *AuthLoginRequest) ProtoReflect() protoreflect.Message
- func (x *AuthLoginRequest) Reset()
- func (x *AuthLoginRequest) String() string
- func (m *AuthLoginRequest) Validate() error
- func (m *AuthLoginRequest) ValidateAll() error
- type AuthLoginRequestMultiError
- type AuthLoginRequestValidationError
- func (e AuthLoginRequestValidationError) Cause() error
- func (e AuthLoginRequestValidationError) Error() string
- func (e AuthLoginRequestValidationError) ErrorName() string
- func (e AuthLoginRequestValidationError) Field() string
- func (e AuthLoginRequestValidationError) Key() bool
- func (e AuthLoginRequestValidationError) Reason() string
- type AuthLoginResponse
- func (*AuthLoginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AuthLoginResponse) GetExpiresIn() int64
- func (x *AuthLoginResponse) GetToken() string
- func (*AuthLoginResponse) ProtoMessage()
- func (x *AuthLoginResponse) ProtoReflect() protoreflect.Message
- func (x *AuthLoginResponse) Reset()
- func (x *AuthLoginResponse) String() string
- func (m *AuthLoginResponse) Validate() error
- func (m *AuthLoginResponse) ValidateAll() error
- type AuthLoginResponseMultiError
- type AuthLoginResponseValidationError
- func (e AuthLoginResponseValidationError) Cause() error
- func (e AuthLoginResponseValidationError) Error() string
- func (e AuthLoginResponseValidationError) ErrorName() string
- func (e AuthLoginResponseValidationError) Field() string
- func (e AuthLoginResponseValidationError) Key() bool
- func (e AuthLoginResponseValidationError) Reason() string
- type AuthServer
- type AuthSettingsRequest
- func (*AuthSettingsRequest) Descriptor() ([]byte, []int)deprecated
- func (*AuthSettingsRequest) ProtoMessage()
- func (x *AuthSettingsRequest) ProtoReflect() protoreflect.Message
- func (x *AuthSettingsRequest) Reset()
- func (x *AuthSettingsRequest) String() string
- func (m *AuthSettingsRequest) Validate() error
- func (m *AuthSettingsRequest) ValidateAll() error
- type AuthSettingsRequestMultiError
- type AuthSettingsRequestValidationError
- func (e AuthSettingsRequestValidationError) Cause() error
- func (e AuthSettingsRequestValidationError) Error() string
- func (e AuthSettingsRequestValidationError) ErrorName() string
- func (e AuthSettingsRequestValidationError) Field() string
- func (e AuthSettingsRequestValidationError) Key() bool
- func (e AuthSettingsRequestValidationError) Reason() string
- type AuthSettingsResponse
- func (*AuthSettingsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AuthSettingsResponse) GetItems() []*AuthSettingsResponse_OidcSetting
- func (*AuthSettingsResponse) ProtoMessage()
- func (x *AuthSettingsResponse) ProtoReflect() protoreflect.Message
- func (x *AuthSettingsResponse) Reset()
- func (x *AuthSettingsResponse) String() string
- func (m *AuthSettingsResponse) Validate() error
- func (m *AuthSettingsResponse) ValidateAll() error
- type AuthSettingsResponseMultiError
- type AuthSettingsResponseValidationError
- func (e AuthSettingsResponseValidationError) Cause() error
- func (e AuthSettingsResponseValidationError) Error() string
- func (e AuthSettingsResponseValidationError) ErrorName() string
- func (e AuthSettingsResponseValidationError) Field() string
- func (e AuthSettingsResponseValidationError) Key() bool
- func (e AuthSettingsResponseValidationError) Reason() string
- type AuthSettingsResponse_OidcSetting
- func (*AuthSettingsResponse_OidcSetting) Descriptor() ([]byte, []int)deprecated
- func (x *AuthSettingsResponse_OidcSetting) GetEnabled() bool
- func (x *AuthSettingsResponse_OidcSetting) GetEndSessionEndpoint() string
- func (x *AuthSettingsResponse_OidcSetting) GetName() string
- func (x *AuthSettingsResponse_OidcSetting) GetState() string
- func (x *AuthSettingsResponse_OidcSetting) GetUrl() string
- func (*AuthSettingsResponse_OidcSetting) ProtoMessage()
- func (x *AuthSettingsResponse_OidcSetting) ProtoReflect() protoreflect.Message
- func (x *AuthSettingsResponse_OidcSetting) Reset()
- func (x *AuthSettingsResponse_OidcSetting) String() string
- func (m *AuthSettingsResponse_OidcSetting) Validate() error
- func (m *AuthSettingsResponse_OidcSetting) ValidateAll() error
- type AuthSettingsResponse_OidcSettingMultiError
- type AuthSettingsResponse_OidcSettingValidationError
- func (e AuthSettingsResponse_OidcSettingValidationError) Cause() error
- func (e AuthSettingsResponse_OidcSettingValidationError) Error() string
- func (e AuthSettingsResponse_OidcSettingValidationError) ErrorName() string
- func (e AuthSettingsResponse_OidcSettingValidationError) Field() string
- func (e AuthSettingsResponse_OidcSettingValidationError) Key() bool
- func (e AuthSettingsResponse_OidcSettingValidationError) Reason() string
- type UnimplementedAuthServer
- func (UnimplementedAuthServer) Exchange(context.Context, *AuthExchangeRequest) (*AuthExchangeResponse, error)
- func (UnimplementedAuthServer) Info(context.Context, *AuthInfoRequest) (*AuthInfoResponse, error)
- func (UnimplementedAuthServer) Login(context.Context, *AuthLoginRequest) (*AuthLoginResponse, error)
- func (UnimplementedAuthServer) Settings(context.Context, *AuthSettingsRequest) (*AuthSettingsResponse, error)
- type UnsafeAuthServer
Constants ¶
This section is empty.
Variables ¶
var Auth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Auth", HandlerType: (*AuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _Auth_Login_Handler, }, { MethodName: "Info", Handler: _Auth_Info_Handler, }, { MethodName: "Settings", Handler: _Auth_Settings_Handler, }, { MethodName: "Exchange", Handler: _Auth_Exchange_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth/auth.proto", }
Auth_ServiceDesc is the grpc.ServiceDesc for Auth service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_auth_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthHandler ¶
RegisterAuthHandler registers the http handlers for service Auth to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAuthHandlerClient ¶
RegisterAuthHandlerClient registers the http handlers for service Auth to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthClient" to call the correct interceptors.
func RegisterAuthHandlerFromEndpoint ¶
func RegisterAuthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAuthHandlerFromEndpoint is same as RegisterAuthHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAuthHandlerServer ¶
RegisterAuthHandlerServer registers the http handlers for service Auth to "mux". UnaryRPC :call AuthServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthHandlerFromEndpoint instead.
func RegisterAuthServer ¶
func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
Types ¶
type AuthClient ¶
type AuthClient interface { // Login 登录接口 Login(ctx context.Context, in *AuthLoginRequest, opts ...grpc.CallOption) (*AuthLoginResponse, error) // Info 获取当前登录的用户信息 Info(ctx context.Context, in *AuthInfoRequest, opts ...grpc.CallOption) (*AuthInfoResponse, error) // Settings 获取 sso 配置以及跳转 url Settings(ctx context.Context, in *AuthSettingsRequest, opts ...grpc.CallOption) (*AuthSettingsResponse, error) // Exchange sso code 换取 token Exchange(ctx context.Context, in *AuthExchangeRequest, opts ...grpc.CallOption) (*AuthExchangeResponse, error) }
AuthClient is the client API for Auth service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAuthClient ¶
func NewAuthClient(cc grpc.ClientConnInterface) AuthClient
type AuthExchangeRequest ¶
type AuthExchangeRequest struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*AuthExchangeRequest) Descriptor
deprecated
func (*AuthExchangeRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthExchangeRequest.ProtoReflect.Descriptor instead.
func (*AuthExchangeRequest) GetCode ¶
func (x *AuthExchangeRequest) GetCode() string
func (*AuthExchangeRequest) ProtoMessage ¶
func (*AuthExchangeRequest) ProtoMessage()
func (*AuthExchangeRequest) ProtoReflect ¶
func (x *AuthExchangeRequest) ProtoReflect() protoreflect.Message
func (*AuthExchangeRequest) Reset ¶
func (x *AuthExchangeRequest) Reset()
func (*AuthExchangeRequest) String ¶
func (x *AuthExchangeRequest) String() string
func (*AuthExchangeRequest) Validate ¶
func (m *AuthExchangeRequest) Validate() error
Validate checks the field values on AuthExchangeRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AuthExchangeRequest) ValidateAll ¶
func (m *AuthExchangeRequest) ValidateAll() error
ValidateAll checks the field values on AuthExchangeRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AuthExchangeRequestMultiError, or nil if none found.
type AuthExchangeRequestMultiError ¶
type AuthExchangeRequestMultiError []error
AuthExchangeRequestMultiError is an error wrapping multiple validation errors returned by AuthExchangeRequest.ValidateAll() if the designated constraints aren't met.
func (AuthExchangeRequestMultiError) AllErrors ¶
func (m AuthExchangeRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AuthExchangeRequestMultiError) Error ¶
func (m AuthExchangeRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AuthExchangeRequestValidationError ¶
type AuthExchangeRequestValidationError struct {
// contains filtered or unexported fields
}
AuthExchangeRequestValidationError is the validation error returned by AuthExchangeRequest.Validate if the designated constraints aren't met.
func (AuthExchangeRequestValidationError) Cause ¶
func (e AuthExchangeRequestValidationError) Cause() error
Cause function returns cause value.
func (AuthExchangeRequestValidationError) Error ¶
func (e AuthExchangeRequestValidationError) Error() string
Error satisfies the builtin error interface
func (AuthExchangeRequestValidationError) ErrorName ¶
func (e AuthExchangeRequestValidationError) ErrorName() string
ErrorName returns error name.
func (AuthExchangeRequestValidationError) Field ¶
func (e AuthExchangeRequestValidationError) Field() string
Field function returns field value.
func (AuthExchangeRequestValidationError) Key ¶
func (e AuthExchangeRequestValidationError) Key() bool
Key function returns key value.
func (AuthExchangeRequestValidationError) Reason ¶
func (e AuthExchangeRequestValidationError) Reason() string
Reason function returns reason value.
type AuthExchangeResponse ¶
type AuthExchangeResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` ExpiresIn int64 `protobuf:"varint,2,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"` // contains filtered or unexported fields }
func (*AuthExchangeResponse) Descriptor
deprecated
func (*AuthExchangeResponse) Descriptor() ([]byte, []int)
Deprecated: Use AuthExchangeResponse.ProtoReflect.Descriptor instead.
func (*AuthExchangeResponse) GetExpiresIn ¶
func (x *AuthExchangeResponse) GetExpiresIn() int64
func (*AuthExchangeResponse) GetToken ¶
func (x *AuthExchangeResponse) GetToken() string
func (*AuthExchangeResponse) ProtoMessage ¶
func (*AuthExchangeResponse) ProtoMessage()
func (*AuthExchangeResponse) ProtoReflect ¶
func (x *AuthExchangeResponse) ProtoReflect() protoreflect.Message
func (*AuthExchangeResponse) Reset ¶
func (x *AuthExchangeResponse) Reset()
func (*AuthExchangeResponse) String ¶
func (x *AuthExchangeResponse) String() string
func (*AuthExchangeResponse) Validate ¶
func (m *AuthExchangeResponse) Validate() error
Validate checks the field values on AuthExchangeResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AuthExchangeResponse) ValidateAll ¶
func (m *AuthExchangeResponse) ValidateAll() error
ValidateAll checks the field values on AuthExchangeResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AuthExchangeResponseMultiError, or nil if none found.
type AuthExchangeResponseMultiError ¶
type AuthExchangeResponseMultiError []error
AuthExchangeResponseMultiError is an error wrapping multiple validation errors returned by AuthExchangeResponse.ValidateAll() if the designated constraints aren't met.
func (AuthExchangeResponseMultiError) AllErrors ¶
func (m AuthExchangeResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AuthExchangeResponseMultiError) Error ¶
func (m AuthExchangeResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AuthExchangeResponseValidationError ¶
type AuthExchangeResponseValidationError struct {
// contains filtered or unexported fields
}
AuthExchangeResponseValidationError is the validation error returned by AuthExchangeResponse.Validate if the designated constraints aren't met.
func (AuthExchangeResponseValidationError) Cause ¶
func (e AuthExchangeResponseValidationError) Cause() error
Cause function returns cause value.
func (AuthExchangeResponseValidationError) Error ¶
func (e AuthExchangeResponseValidationError) Error() string
Error satisfies the builtin error interface
func (AuthExchangeResponseValidationError) ErrorName ¶
func (e AuthExchangeResponseValidationError) ErrorName() string
ErrorName returns error name.
func (AuthExchangeResponseValidationError) Field ¶
func (e AuthExchangeResponseValidationError) Field() string
Field function returns field value.
func (AuthExchangeResponseValidationError) Key ¶
func (e AuthExchangeResponseValidationError) Key() bool
Key function returns key value.
func (AuthExchangeResponseValidationError) Reason ¶
func (e AuthExchangeResponseValidationError) Reason() string
Reason function returns reason value.
type AuthInfoRequest ¶
type AuthInfoRequest struct {
// contains filtered or unexported fields
}
func (*AuthInfoRequest) Descriptor
deprecated
func (*AuthInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthInfoRequest.ProtoReflect.Descriptor instead.
func (*AuthInfoRequest) ProtoMessage ¶
func (*AuthInfoRequest) ProtoMessage()
func (*AuthInfoRequest) ProtoReflect ¶
func (x *AuthInfoRequest) ProtoReflect() protoreflect.Message
func (*AuthInfoRequest) Reset ¶
func (x *AuthInfoRequest) Reset()
func (*AuthInfoRequest) String ¶
func (x *AuthInfoRequest) String() string
func (*AuthInfoRequest) Validate ¶
func (m *AuthInfoRequest) Validate() error
Validate checks the field values on AuthInfoRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AuthInfoRequest) ValidateAll ¶
func (m *AuthInfoRequest) ValidateAll() error
ValidateAll checks the field values on AuthInfoRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AuthInfoRequestMultiError, or nil if none found.
type AuthInfoRequestMultiError ¶
type AuthInfoRequestMultiError []error
AuthInfoRequestMultiError is an error wrapping multiple validation errors returned by AuthInfoRequest.ValidateAll() if the designated constraints aren't met.
func (AuthInfoRequestMultiError) AllErrors ¶
func (m AuthInfoRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AuthInfoRequestMultiError) Error ¶
func (m AuthInfoRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AuthInfoRequestValidationError ¶
type AuthInfoRequestValidationError struct {
// contains filtered or unexported fields
}
AuthInfoRequestValidationError is the validation error returned by AuthInfoRequest.Validate if the designated constraints aren't met.
func (AuthInfoRequestValidationError) Cause ¶
func (e AuthInfoRequestValidationError) Cause() error
Cause function returns cause value.
func (AuthInfoRequestValidationError) Error ¶
func (e AuthInfoRequestValidationError) Error() string
Error satisfies the builtin error interface
func (AuthInfoRequestValidationError) ErrorName ¶
func (e AuthInfoRequestValidationError) ErrorName() string
ErrorName returns error name.
func (AuthInfoRequestValidationError) Field ¶
func (e AuthInfoRequestValidationError) Field() string
Field function returns field value.
func (AuthInfoRequestValidationError) Key ¶
func (e AuthInfoRequestValidationError) Key() bool
Key function returns key value.
func (AuthInfoRequestValidationError) Reason ¶
func (e AuthInfoRequestValidationError) Reason() string
Reason function returns reason value.
type AuthInfoResponse ¶
type AuthInfoResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Avatar string `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` LogoutUrl string `protobuf:"bytes,5,opt,name=logout_url,json=logoutUrl,proto3" json:"logout_url,omitempty"` Roles []string `protobuf:"bytes,6,rep,name=roles,proto3" json:"roles,omitempty"` // contains filtered or unexported fields }
func (*AuthInfoResponse) Descriptor
deprecated
func (*AuthInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use AuthInfoResponse.ProtoReflect.Descriptor instead.
func (*AuthInfoResponse) GetAvatar ¶
func (x *AuthInfoResponse) GetAvatar() string
func (*AuthInfoResponse) GetEmail ¶
func (x *AuthInfoResponse) GetEmail() string
func (*AuthInfoResponse) GetId ¶
func (x *AuthInfoResponse) GetId() string
func (*AuthInfoResponse) GetLogoutUrl ¶
func (x *AuthInfoResponse) GetLogoutUrl() string
func (*AuthInfoResponse) GetName ¶
func (x *AuthInfoResponse) GetName() string
func (*AuthInfoResponse) GetRoles ¶
func (x *AuthInfoResponse) GetRoles() []string
func (*AuthInfoResponse) ProtoMessage ¶
func (*AuthInfoResponse) ProtoMessage()
func (*AuthInfoResponse) ProtoReflect ¶
func (x *AuthInfoResponse) ProtoReflect() protoreflect.Message
func (*AuthInfoResponse) Reset ¶
func (x *AuthInfoResponse) Reset()
func (*AuthInfoResponse) String ¶
func (x *AuthInfoResponse) String() string
func (*AuthInfoResponse) Validate ¶
func (m *AuthInfoResponse) Validate() error
Validate checks the field values on AuthInfoResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AuthInfoResponse) ValidateAll ¶
func (m *AuthInfoResponse) ValidateAll() error
ValidateAll checks the field values on AuthInfoResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AuthInfoResponseMultiError, or nil if none found.
type AuthInfoResponseMultiError ¶
type AuthInfoResponseMultiError []error
AuthInfoResponseMultiError is an error wrapping multiple validation errors returned by AuthInfoResponse.ValidateAll() if the designated constraints aren't met.
func (AuthInfoResponseMultiError) AllErrors ¶
func (m AuthInfoResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AuthInfoResponseMultiError) Error ¶
func (m AuthInfoResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AuthInfoResponseValidationError ¶
type AuthInfoResponseValidationError struct {
// contains filtered or unexported fields
}
AuthInfoResponseValidationError is the validation error returned by AuthInfoResponse.Validate if the designated constraints aren't met.
func (AuthInfoResponseValidationError) Cause ¶
func (e AuthInfoResponseValidationError) Cause() error
Cause function returns cause value.
func (AuthInfoResponseValidationError) Error ¶
func (e AuthInfoResponseValidationError) Error() string
Error satisfies the builtin error interface
func (AuthInfoResponseValidationError) ErrorName ¶
func (e AuthInfoResponseValidationError) ErrorName() string
ErrorName returns error name.
func (AuthInfoResponseValidationError) Field ¶
func (e AuthInfoResponseValidationError) Field() string
Field function returns field value.
func (AuthInfoResponseValidationError) Key ¶
func (e AuthInfoResponseValidationError) Key() bool
Key function returns key value.
func (AuthInfoResponseValidationError) Reason ¶
func (e AuthInfoResponseValidationError) Reason() string
Reason function returns reason value.
type AuthLoginRequest ¶
type AuthLoginRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*AuthLoginRequest) Descriptor
deprecated
func (*AuthLoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthLoginRequest.ProtoReflect.Descriptor instead.
func (*AuthLoginRequest) GetPassword ¶
func (x *AuthLoginRequest) GetPassword() string
func (*AuthLoginRequest) GetUsername ¶
func (x *AuthLoginRequest) GetUsername() string
func (*AuthLoginRequest) ProtoMessage ¶
func (*AuthLoginRequest) ProtoMessage()
func (*AuthLoginRequest) ProtoReflect ¶
func (x *AuthLoginRequest) ProtoReflect() protoreflect.Message
func (*AuthLoginRequest) Reset ¶
func (x *AuthLoginRequest) Reset()
func (*AuthLoginRequest) String ¶
func (x *AuthLoginRequest) String() string
func (*AuthLoginRequest) Validate ¶
func (m *AuthLoginRequest) Validate() error
Validate checks the field values on AuthLoginRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AuthLoginRequest) ValidateAll ¶
func (m *AuthLoginRequest) ValidateAll() error
ValidateAll checks the field values on AuthLoginRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AuthLoginRequestMultiError, or nil if none found.
type AuthLoginRequestMultiError ¶
type AuthLoginRequestMultiError []error
AuthLoginRequestMultiError is an error wrapping multiple validation errors returned by AuthLoginRequest.ValidateAll() if the designated constraints aren't met.
func (AuthLoginRequestMultiError) AllErrors ¶
func (m AuthLoginRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AuthLoginRequestMultiError) Error ¶
func (m AuthLoginRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AuthLoginRequestValidationError ¶
type AuthLoginRequestValidationError struct {
// contains filtered or unexported fields
}
AuthLoginRequestValidationError is the validation error returned by AuthLoginRequest.Validate if the designated constraints aren't met.
func (AuthLoginRequestValidationError) Cause ¶
func (e AuthLoginRequestValidationError) Cause() error
Cause function returns cause value.
func (AuthLoginRequestValidationError) Error ¶
func (e AuthLoginRequestValidationError) Error() string
Error satisfies the builtin error interface
func (AuthLoginRequestValidationError) ErrorName ¶
func (e AuthLoginRequestValidationError) ErrorName() string
ErrorName returns error name.
func (AuthLoginRequestValidationError) Field ¶
func (e AuthLoginRequestValidationError) Field() string
Field function returns field value.
func (AuthLoginRequestValidationError) Key ¶
func (e AuthLoginRequestValidationError) Key() bool
Key function returns key value.
func (AuthLoginRequestValidationError) Reason ¶
func (e AuthLoginRequestValidationError) Reason() string
Reason function returns reason value.
type AuthLoginResponse ¶
type AuthLoginResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` ExpiresIn int64 `protobuf:"varint,2,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"` // contains filtered or unexported fields }
func (*AuthLoginResponse) Descriptor
deprecated
func (*AuthLoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use AuthLoginResponse.ProtoReflect.Descriptor instead.
func (*AuthLoginResponse) GetExpiresIn ¶
func (x *AuthLoginResponse) GetExpiresIn() int64
func (*AuthLoginResponse) GetToken ¶
func (x *AuthLoginResponse) GetToken() string
func (*AuthLoginResponse) ProtoMessage ¶
func (*AuthLoginResponse) ProtoMessage()
func (*AuthLoginResponse) ProtoReflect ¶
func (x *AuthLoginResponse) ProtoReflect() protoreflect.Message
func (*AuthLoginResponse) Reset ¶
func (x *AuthLoginResponse) Reset()
func (*AuthLoginResponse) String ¶
func (x *AuthLoginResponse) String() string
func (*AuthLoginResponse) Validate ¶
func (m *AuthLoginResponse) Validate() error
Validate checks the field values on AuthLoginResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AuthLoginResponse) ValidateAll ¶
func (m *AuthLoginResponse) ValidateAll() error
ValidateAll checks the field values on AuthLoginResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AuthLoginResponseMultiError, or nil if none found.
type AuthLoginResponseMultiError ¶
type AuthLoginResponseMultiError []error
AuthLoginResponseMultiError is an error wrapping multiple validation errors returned by AuthLoginResponse.ValidateAll() if the designated constraints aren't met.
func (AuthLoginResponseMultiError) AllErrors ¶
func (m AuthLoginResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AuthLoginResponseMultiError) Error ¶
func (m AuthLoginResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AuthLoginResponseValidationError ¶
type AuthLoginResponseValidationError struct {
// contains filtered or unexported fields
}
AuthLoginResponseValidationError is the validation error returned by AuthLoginResponse.Validate if the designated constraints aren't met.
func (AuthLoginResponseValidationError) Cause ¶
func (e AuthLoginResponseValidationError) Cause() error
Cause function returns cause value.
func (AuthLoginResponseValidationError) Error ¶
func (e AuthLoginResponseValidationError) Error() string
Error satisfies the builtin error interface
func (AuthLoginResponseValidationError) ErrorName ¶
func (e AuthLoginResponseValidationError) ErrorName() string
ErrorName returns error name.
func (AuthLoginResponseValidationError) Field ¶
func (e AuthLoginResponseValidationError) Field() string
Field function returns field value.
func (AuthLoginResponseValidationError) Key ¶
func (e AuthLoginResponseValidationError) Key() bool
Key function returns key value.
func (AuthLoginResponseValidationError) Reason ¶
func (e AuthLoginResponseValidationError) Reason() string
Reason function returns reason value.
type AuthServer ¶
type AuthServer interface { // Login 登录接口 Login(context.Context, *AuthLoginRequest) (*AuthLoginResponse, error) // Info 获取当前登录的用户信息 Info(context.Context, *AuthInfoRequest) (*AuthInfoResponse, error) // Settings 获取 sso 配置以及跳转 url Settings(context.Context, *AuthSettingsRequest) (*AuthSettingsResponse, error) // Exchange sso code 换取 token Exchange(context.Context, *AuthExchangeRequest) (*AuthExchangeResponse, error) // contains filtered or unexported methods }
AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility
type AuthSettingsRequest ¶
type AuthSettingsRequest struct {
// contains filtered or unexported fields
}
func (*AuthSettingsRequest) Descriptor
deprecated
func (*AuthSettingsRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthSettingsRequest.ProtoReflect.Descriptor instead.
func (*AuthSettingsRequest) ProtoMessage ¶
func (*AuthSettingsRequest) ProtoMessage()
func (*AuthSettingsRequest) ProtoReflect ¶
func (x *AuthSettingsRequest) ProtoReflect() protoreflect.Message
func (*AuthSettingsRequest) Reset ¶
func (x *AuthSettingsRequest) Reset()
func (*AuthSettingsRequest) String ¶
func (x *AuthSettingsRequest) String() string
func (*AuthSettingsRequest) Validate ¶
func (m *AuthSettingsRequest) Validate() error
Validate checks the field values on AuthSettingsRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AuthSettingsRequest) ValidateAll ¶
func (m *AuthSettingsRequest) ValidateAll() error
ValidateAll checks the field values on AuthSettingsRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AuthSettingsRequestMultiError, or nil if none found.
type AuthSettingsRequestMultiError ¶
type AuthSettingsRequestMultiError []error
AuthSettingsRequestMultiError is an error wrapping multiple validation errors returned by AuthSettingsRequest.ValidateAll() if the designated constraints aren't met.
func (AuthSettingsRequestMultiError) AllErrors ¶
func (m AuthSettingsRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AuthSettingsRequestMultiError) Error ¶
func (m AuthSettingsRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AuthSettingsRequestValidationError ¶
type AuthSettingsRequestValidationError struct {
// contains filtered or unexported fields
}
AuthSettingsRequestValidationError is the validation error returned by AuthSettingsRequest.Validate if the designated constraints aren't met.
func (AuthSettingsRequestValidationError) Cause ¶
func (e AuthSettingsRequestValidationError) Cause() error
Cause function returns cause value.
func (AuthSettingsRequestValidationError) Error ¶
func (e AuthSettingsRequestValidationError) Error() string
Error satisfies the builtin error interface
func (AuthSettingsRequestValidationError) ErrorName ¶
func (e AuthSettingsRequestValidationError) ErrorName() string
ErrorName returns error name.
func (AuthSettingsRequestValidationError) Field ¶
func (e AuthSettingsRequestValidationError) Field() string
Field function returns field value.
func (AuthSettingsRequestValidationError) Key ¶
func (e AuthSettingsRequestValidationError) Key() bool
Key function returns key value.
func (AuthSettingsRequestValidationError) Reason ¶
func (e AuthSettingsRequestValidationError) Reason() string
Reason function returns reason value.
type AuthSettingsResponse ¶
type AuthSettingsResponse struct { Items []*AuthSettingsResponse_OidcSetting `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*AuthSettingsResponse) Descriptor
deprecated
func (*AuthSettingsResponse) Descriptor() ([]byte, []int)
Deprecated: Use AuthSettingsResponse.ProtoReflect.Descriptor instead.
func (*AuthSettingsResponse) GetItems ¶
func (x *AuthSettingsResponse) GetItems() []*AuthSettingsResponse_OidcSetting
func (*AuthSettingsResponse) ProtoMessage ¶
func (*AuthSettingsResponse) ProtoMessage()
func (*AuthSettingsResponse) ProtoReflect ¶
func (x *AuthSettingsResponse) ProtoReflect() protoreflect.Message
func (*AuthSettingsResponse) Reset ¶
func (x *AuthSettingsResponse) Reset()
func (*AuthSettingsResponse) String ¶
func (x *AuthSettingsResponse) String() string
func (*AuthSettingsResponse) Validate ¶
func (m *AuthSettingsResponse) Validate() error
Validate checks the field values on AuthSettingsResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AuthSettingsResponse) ValidateAll ¶
func (m *AuthSettingsResponse) ValidateAll() error
ValidateAll checks the field values on AuthSettingsResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AuthSettingsResponseMultiError, or nil if none found.
type AuthSettingsResponseMultiError ¶
type AuthSettingsResponseMultiError []error
AuthSettingsResponseMultiError is an error wrapping multiple validation errors returned by AuthSettingsResponse.ValidateAll() if the designated constraints aren't met.
func (AuthSettingsResponseMultiError) AllErrors ¶
func (m AuthSettingsResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AuthSettingsResponseMultiError) Error ¶
func (m AuthSettingsResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AuthSettingsResponseValidationError ¶
type AuthSettingsResponseValidationError struct {
// contains filtered or unexported fields
}
AuthSettingsResponseValidationError is the validation error returned by AuthSettingsResponse.Validate if the designated constraints aren't met.
func (AuthSettingsResponseValidationError) Cause ¶
func (e AuthSettingsResponseValidationError) Cause() error
Cause function returns cause value.
func (AuthSettingsResponseValidationError) Error ¶
func (e AuthSettingsResponseValidationError) Error() string
Error satisfies the builtin error interface
func (AuthSettingsResponseValidationError) ErrorName ¶
func (e AuthSettingsResponseValidationError) ErrorName() string
ErrorName returns error name.
func (AuthSettingsResponseValidationError) Field ¶
func (e AuthSettingsResponseValidationError) Field() string
Field function returns field value.
func (AuthSettingsResponseValidationError) Key ¶
func (e AuthSettingsResponseValidationError) Key() bool
Key function returns key value.
func (AuthSettingsResponseValidationError) Reason ¶
func (e AuthSettingsResponseValidationError) Reason() string
Reason function returns reason value.
type AuthSettingsResponse_OidcSetting ¶
type AuthSettingsResponse_OidcSetting struct { Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` EndSessionEndpoint string `protobuf:"bytes,4,opt,name=end_session_endpoint,json=endSessionEndpoint,proto3" json:"end_session_endpoint,omitempty"` State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"` // contains filtered or unexported fields }
func (*AuthSettingsResponse_OidcSetting) Descriptor
deprecated
func (*AuthSettingsResponse_OidcSetting) Descriptor() ([]byte, []int)
Deprecated: Use AuthSettingsResponse_OidcSetting.ProtoReflect.Descriptor instead.
func (*AuthSettingsResponse_OidcSetting) GetEnabled ¶
func (x *AuthSettingsResponse_OidcSetting) GetEnabled() bool
func (*AuthSettingsResponse_OidcSetting) GetEndSessionEndpoint ¶
func (x *AuthSettingsResponse_OidcSetting) GetEndSessionEndpoint() string
func (*AuthSettingsResponse_OidcSetting) GetName ¶
func (x *AuthSettingsResponse_OidcSetting) GetName() string
func (*AuthSettingsResponse_OidcSetting) GetState ¶
func (x *AuthSettingsResponse_OidcSetting) GetState() string
func (*AuthSettingsResponse_OidcSetting) GetUrl ¶
func (x *AuthSettingsResponse_OidcSetting) GetUrl() string
func (*AuthSettingsResponse_OidcSetting) ProtoMessage ¶
func (*AuthSettingsResponse_OidcSetting) ProtoMessage()
func (*AuthSettingsResponse_OidcSetting) ProtoReflect ¶
func (x *AuthSettingsResponse_OidcSetting) ProtoReflect() protoreflect.Message
func (*AuthSettingsResponse_OidcSetting) Reset ¶
func (x *AuthSettingsResponse_OidcSetting) Reset()
func (*AuthSettingsResponse_OidcSetting) String ¶
func (x *AuthSettingsResponse_OidcSetting) String() string
func (*AuthSettingsResponse_OidcSetting) Validate ¶
func (m *AuthSettingsResponse_OidcSetting) Validate() error
Validate checks the field values on AuthSettingsResponse_OidcSetting with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AuthSettingsResponse_OidcSetting) ValidateAll ¶
func (m *AuthSettingsResponse_OidcSetting) ValidateAll() error
ValidateAll checks the field values on AuthSettingsResponse_OidcSetting with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AuthSettingsResponse_OidcSettingMultiError, or nil if none found.
type AuthSettingsResponse_OidcSettingMultiError ¶
type AuthSettingsResponse_OidcSettingMultiError []error
AuthSettingsResponse_OidcSettingMultiError is an error wrapping multiple validation errors returned by AuthSettingsResponse_OidcSetting.ValidateAll() if the designated constraints aren't met.
func (AuthSettingsResponse_OidcSettingMultiError) AllErrors ¶
func (m AuthSettingsResponse_OidcSettingMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AuthSettingsResponse_OidcSettingMultiError) Error ¶
func (m AuthSettingsResponse_OidcSettingMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AuthSettingsResponse_OidcSettingValidationError ¶
type AuthSettingsResponse_OidcSettingValidationError struct {
// contains filtered or unexported fields
}
AuthSettingsResponse_OidcSettingValidationError is the validation error returned by AuthSettingsResponse_OidcSetting.Validate if the designated constraints aren't met.
func (AuthSettingsResponse_OidcSettingValidationError) Cause ¶
func (e AuthSettingsResponse_OidcSettingValidationError) Cause() error
Cause function returns cause value.
func (AuthSettingsResponse_OidcSettingValidationError) Error ¶
func (e AuthSettingsResponse_OidcSettingValidationError) Error() string
Error satisfies the builtin error interface
func (AuthSettingsResponse_OidcSettingValidationError) ErrorName ¶
func (e AuthSettingsResponse_OidcSettingValidationError) ErrorName() string
ErrorName returns error name.
func (AuthSettingsResponse_OidcSettingValidationError) Field ¶
func (e AuthSettingsResponse_OidcSettingValidationError) Field() string
Field function returns field value.
func (AuthSettingsResponse_OidcSettingValidationError) Key ¶
func (e AuthSettingsResponse_OidcSettingValidationError) Key() bool
Key function returns key value.
func (AuthSettingsResponse_OidcSettingValidationError) Reason ¶
func (e AuthSettingsResponse_OidcSettingValidationError) Reason() string
Reason function returns reason value.
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServer) Exchange ¶
func (UnimplementedAuthServer) Exchange(context.Context, *AuthExchangeRequest) (*AuthExchangeResponse, error)
func (UnimplementedAuthServer) Info ¶
func (UnimplementedAuthServer) Info(context.Context, *AuthInfoRequest) (*AuthInfoResponse, error)
func (UnimplementedAuthServer) Login ¶
func (UnimplementedAuthServer) Login(context.Context, *AuthLoginRequest) (*AuthLoginResponse, error)
func (UnimplementedAuthServer) Settings ¶
func (UnimplementedAuthServer) Settings(context.Context, *AuthSettingsRequest) (*AuthSettingsResponse, error)
type UnsafeAuthServer ¶
type UnsafeAuthServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServer will result in compilation errors.