mirror of
https://github.com/hexolan/stocklet.git
synced 2026-12-01 03:09:10 +00:00
d05489c01b
Signed-off-by: Declan Teevan <dt@hexolan.com>
423 lines
15 KiB
Go
423 lines
15 KiB
Go
// Copyright (C) 2024 Declan Teevan
|
|
//
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU Affero General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.12
|
|
// protoc (unknown)
|
|
// source: stocklet/auth/v1/service.proto
|
|
|
|
package auth_v1
|
|
|
|
import (
|
|
_ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
|
|
v1 "github.com/hexolan/stocklet/internal/pkg/protogen/common/v1"
|
|
v11 "github.com/hexolan/stocklet/internal/pkg/protogen/events/v1"
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
_ "google.golang.org/genproto/googleapis/api/visibility"
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
type GetJwksRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetJwksRequest) Reset() {
|
|
*x = GetJwksRequest{}
|
|
mi := &file_stocklet_auth_v1_service_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetJwksRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetJwksRequest) ProtoMessage() {}
|
|
|
|
func (x *GetJwksRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_stocklet_auth_v1_service_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GetJwksRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetJwksRequest) Descriptor() ([]byte, []int) {
|
|
return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
type GetJwksResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Keys []*PublicEcJWK `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetJwksResponse) Reset() {
|
|
*x = GetJwksResponse{}
|
|
mi := &file_stocklet_auth_v1_service_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetJwksResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetJwksResponse) ProtoMessage() {}
|
|
|
|
func (x *GetJwksResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_stocklet_auth_v1_service_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GetJwksResponse.ProtoReflect.Descriptor instead.
|
|
func (*GetJwksResponse) Descriptor() ([]byte, []int) {
|
|
return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *GetJwksResponse) GetKeys() []*PublicEcJWK {
|
|
if x != nil {
|
|
return x.Keys
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type LoginPasswordRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *LoginPasswordRequest) Reset() {
|
|
*x = LoginPasswordRequest{}
|
|
mi := &file_stocklet_auth_v1_service_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *LoginPasswordRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*LoginPasswordRequest) ProtoMessage() {}
|
|
|
|
func (x *LoginPasswordRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_stocklet_auth_v1_service_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use LoginPasswordRequest.ProtoReflect.Descriptor instead.
|
|
func (*LoginPasswordRequest) Descriptor() ([]byte, []int) {
|
|
return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *LoginPasswordRequest) GetUserId() string {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginPasswordRequest) GetPassword() string {
|
|
if x != nil {
|
|
return x.Password
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type LoginPasswordResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Detail string `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail,omitempty"`
|
|
Data *AuthToken `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *LoginPasswordResponse) Reset() {
|
|
*x = LoginPasswordResponse{}
|
|
mi := &file_stocklet_auth_v1_service_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *LoginPasswordResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*LoginPasswordResponse) ProtoMessage() {}
|
|
|
|
func (x *LoginPasswordResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_stocklet_auth_v1_service_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use LoginPasswordResponse.ProtoReflect.Descriptor instead.
|
|
func (*LoginPasswordResponse) Descriptor() ([]byte, []int) {
|
|
return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *LoginPasswordResponse) GetDetail() string {
|
|
if x != nil {
|
|
return x.Detail
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *LoginPasswordResponse) GetData() *AuthToken {
|
|
if x != nil {
|
|
return x.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type SetPasswordRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SetPasswordRequest) Reset() {
|
|
*x = SetPasswordRequest{}
|
|
mi := &file_stocklet_auth_v1_service_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SetPasswordRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SetPasswordRequest) ProtoMessage() {}
|
|
|
|
func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_stocklet_auth_v1_service_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SetPasswordRequest.ProtoReflect.Descriptor instead.
|
|
func (*SetPasswordRequest) Descriptor() ([]byte, []int) {
|
|
return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *SetPasswordRequest) GetUserId() string {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SetPasswordRequest) GetPassword() string {
|
|
if x != nil {
|
|
return x.Password
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SetPasswordResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Detail string `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SetPasswordResponse) Reset() {
|
|
*x = SetPasswordResponse{}
|
|
mi := &file_stocklet_auth_v1_service_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SetPasswordResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SetPasswordResponse) ProtoMessage() {}
|
|
|
|
func (x *SetPasswordResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_stocklet_auth_v1_service_proto_msgTypes[5]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SetPasswordResponse.ProtoReflect.Descriptor instead.
|
|
func (*SetPasswordResponse) Descriptor() ([]byte, []int) {
|
|
return file_stocklet_auth_v1_service_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *SetPasswordResponse) GetDetail() string {
|
|
if x != nil {
|
|
return x.Detail
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_stocklet_auth_v1_service_proto protoreflect.FileDescriptor
|
|
|
|
const file_stocklet_auth_v1_service_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x1estocklet/auth/v1/service.proto\x12\x10stocklet.auth.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/visibility.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cstocklet/auth/v1/types.proto\x1a!stocklet/common/v1/requests.proto\x1a\x1dstocklet/events/v1/user.proto\"\x10\n" +
|
|
"\x0eGetJwksRequest\"D\n" +
|
|
"\x0fGetJwksResponse\x121\n" +
|
|
"\x04keys\x18\x01 \x03(\v2\x1d.stocklet.auth.v1.PublicEcJWKR\x04keys\"g\n" +
|
|
"\x14LoginPasswordRequest\x12$\n" +
|
|
"\auser_id\x18\x01 \x01(\tB\v\xe2A\x01\x02\xbaH\x04r\x02\x10\x01R\x06userId\x12)\n" +
|
|
"\bpassword\x18\x02 \x01(\tB\r\xe2A\x01\x02\xbaH\x06r\x04\x10\x01\x18@R\bpassword\"`\n" +
|
|
"\x15LoginPasswordResponse\x12\x16\n" +
|
|
"\x06detail\x18\x01 \x01(\tR\x06detail\x12/\n" +
|
|
"\x04data\x18\x02 \x01(\v2\x1b.stocklet.auth.v1.AuthTokenR\x04data\"e\n" +
|
|
"\x12SetPasswordRequest\x12$\n" +
|
|
"\auser_id\x18\x01 \x01(\tB\v\xe2A\x01\x02\xbaH\x04r\x02\x10\x01R\x06userId\x12)\n" +
|
|
"\bpassword\x18\x02 \x01(\tB\r\xe2A\x01\x02\xbaH\x06r\x04\x10\x01\x18@R\bpassword\"-\n" +
|
|
"\x13SetPasswordResponse\x12\x16\n" +
|
|
"\x06detail\x18\x01 \x01(\tR\x06detail2\xd0\x04\n" +
|
|
"\vAuthService\x12x\n" +
|
|
"\vServiceInfo\x12&.stocklet.common.v1.ServiceInfoRequest\x1a'.stocklet.common.v1.ServiceInfoResponse\"\x18\x82\xd3\xe4\x93\x02\x12\x12\x10/v1/auth/service\x12e\n" +
|
|
"\aGetJwks\x12 .stocklet.auth.v1.GetJwksRequest\x1a!.stocklet.auth.v1.GetJwksResponse\"\x15\x82\xd3\xe4\x93\x02\x0f\x12\r/v1/auth/jwks\x12{\n" +
|
|
"\rLoginPassword\x12&.stocklet.auth.v1.LoginPasswordRequest\x1a'.stocklet.auth.v1.LoginPasswordResponse\"\x19\x82\xd3\xe4\x93\x02\x13:\x01*\"\x0e/v1/auth/login\x12x\n" +
|
|
"\vSetPassword\x12$.stocklet.auth.v1.SetPasswordRequest\x1a%.stocklet.auth.v1.SetPasswordResponse\"\x1c\x82\xd3\xe4\x93\x02\x16:\x01*\"\x11/v1/auth/password\x12i\n" +
|
|
"\x17ProcessUserDeletedEvent\x12$.stocklet.events.v1.UserDeletedEvent\x1a\x16.google.protobuf.Empty\"\x10\xfa\xd2\xe4\x93\x02\n" +
|
|
"\x12\bINTERNALBCZAgithub.com/hexolan/stocklet/internal/pkg/protogen/auth/v1;auth_v1b\x06proto3"
|
|
|
|
var (
|
|
file_stocklet_auth_v1_service_proto_rawDescOnce sync.Once
|
|
file_stocklet_auth_v1_service_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_stocklet_auth_v1_service_proto_rawDescGZIP() []byte {
|
|
file_stocklet_auth_v1_service_proto_rawDescOnce.Do(func() {
|
|
file_stocklet_auth_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_stocklet_auth_v1_service_proto_rawDesc), len(file_stocklet_auth_v1_service_proto_rawDesc)))
|
|
})
|
|
return file_stocklet_auth_v1_service_proto_rawDescData
|
|
}
|
|
|
|
var file_stocklet_auth_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
|
var file_stocklet_auth_v1_service_proto_goTypes = []any{
|
|
(*GetJwksRequest)(nil), // 0: stocklet.auth.v1.GetJwksRequest
|
|
(*GetJwksResponse)(nil), // 1: stocklet.auth.v1.GetJwksResponse
|
|
(*LoginPasswordRequest)(nil), // 2: stocklet.auth.v1.LoginPasswordRequest
|
|
(*LoginPasswordResponse)(nil), // 3: stocklet.auth.v1.LoginPasswordResponse
|
|
(*SetPasswordRequest)(nil), // 4: stocklet.auth.v1.SetPasswordRequest
|
|
(*SetPasswordResponse)(nil), // 5: stocklet.auth.v1.SetPasswordResponse
|
|
(*PublicEcJWK)(nil), // 6: stocklet.auth.v1.PublicEcJWK
|
|
(*AuthToken)(nil), // 7: stocklet.auth.v1.AuthToken
|
|
(*v1.ServiceInfoRequest)(nil), // 8: stocklet.common.v1.ServiceInfoRequest
|
|
(*v11.UserDeletedEvent)(nil), // 9: stocklet.events.v1.UserDeletedEvent
|
|
(*v1.ServiceInfoResponse)(nil), // 10: stocklet.common.v1.ServiceInfoResponse
|
|
(*emptypb.Empty)(nil), // 11: google.protobuf.Empty
|
|
}
|
|
var file_stocklet_auth_v1_service_proto_depIdxs = []int32{
|
|
6, // 0: stocklet.auth.v1.GetJwksResponse.keys:type_name -> stocklet.auth.v1.PublicEcJWK
|
|
7, // 1: stocklet.auth.v1.LoginPasswordResponse.data:type_name -> stocklet.auth.v1.AuthToken
|
|
8, // 2: stocklet.auth.v1.AuthService.ServiceInfo:input_type -> stocklet.common.v1.ServiceInfoRequest
|
|
0, // 3: stocklet.auth.v1.AuthService.GetJwks:input_type -> stocklet.auth.v1.GetJwksRequest
|
|
2, // 4: stocklet.auth.v1.AuthService.LoginPassword:input_type -> stocklet.auth.v1.LoginPasswordRequest
|
|
4, // 5: stocklet.auth.v1.AuthService.SetPassword:input_type -> stocklet.auth.v1.SetPasswordRequest
|
|
9, // 6: stocklet.auth.v1.AuthService.ProcessUserDeletedEvent:input_type -> stocklet.events.v1.UserDeletedEvent
|
|
10, // 7: stocklet.auth.v1.AuthService.ServiceInfo:output_type -> stocklet.common.v1.ServiceInfoResponse
|
|
1, // 8: stocklet.auth.v1.AuthService.GetJwks:output_type -> stocklet.auth.v1.GetJwksResponse
|
|
3, // 9: stocklet.auth.v1.AuthService.LoginPassword:output_type -> stocklet.auth.v1.LoginPasswordResponse
|
|
5, // 10: stocklet.auth.v1.AuthService.SetPassword:output_type -> stocklet.auth.v1.SetPasswordResponse
|
|
11, // 11: stocklet.auth.v1.AuthService.ProcessUserDeletedEvent:output_type -> google.protobuf.Empty
|
|
7, // [7:12] is the sub-list for method output_type
|
|
2, // [2:7] is the sub-list for method input_type
|
|
2, // [2:2] is the sub-list for extension type_name
|
|
2, // [2:2] is the sub-list for extension extendee
|
|
0, // [0:2] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_stocklet_auth_v1_service_proto_init() }
|
|
func file_stocklet_auth_v1_service_proto_init() {
|
|
if File_stocklet_auth_v1_service_proto != nil {
|
|
return
|
|
}
|
|
file_stocklet_auth_v1_types_proto_init()
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_stocklet_auth_v1_service_proto_rawDesc), len(file_stocklet_auth_v1_service_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 6,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_stocklet_auth_v1_service_proto_goTypes,
|
|
DependencyIndexes: file_stocklet_auth_v1_service_proto_depIdxs,
|
|
MessageInfos: file_stocklet_auth_v1_service_proto_msgTypes,
|
|
}.Build()
|
|
File_stocklet_auth_v1_service_proto = out.File
|
|
file_stocklet_auth_v1_service_proto_goTypes = nil
|
|
file_stocklet_auth_v1_service_proto_depIdxs = nil
|
|
}
|