accountsv1

package
v0.0.0-...-90edc4e Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package accountsv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	AccountService_ListAccounts_FullMethodName  = "/accounts.v1.AccountService/ListAccounts"
	AccountService_CreateAccount_FullMethodName = "/accounts.v1.AccountService/CreateAccount"
	AccountService_GetAccount_FullMethodName    = "/accounts.v1.AccountService/GetAccount"
	AccountService_UpdateAccount_FullMethodName = "/accounts.v1.AccountService/UpdateAccount"
	AccountService_DeleteAccount_FullMethodName = "/accounts.v1.AccountService/DeleteAccount"
)

Variables

View Source
var AccountService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "accounts.v1.AccountService",
	HandlerType: (*AccountServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateAccount",
			Handler:    _AccountService_CreateAccount_Handler,
		},
		{
			MethodName: "GetAccount",
			Handler:    _AccountService_GetAccount_Handler,
		},
		{
			MethodName: "UpdateAccount",
			Handler:    _AccountService_UpdateAccount_Handler,
		},
		{
			MethodName: "DeleteAccount",
			Handler:    _AccountService_DeleteAccount_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ListAccounts",
			Handler:       _AccountService_ListAccounts_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "accounts/v1/accounts.proto",
}

AccountService_ServiceDesc is the grpc.ServiceDesc for AccountService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_accounts_v1_accounts_proto protoreflect.FileDescriptor

Functions

func RegisterAccountServiceHandler

func RegisterAccountServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAccountServiceHandler registers the http handlers for service AccountService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAccountServiceHandlerClient

func RegisterAccountServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccountServiceClient) error

RegisterAccountServiceHandlerClient registers the http handlers for service AccountService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AccountServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AccountServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AccountServiceClient" to call the correct interceptors.

func RegisterAccountServiceHandlerFromEndpoint

func RegisterAccountServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAccountServiceHandlerFromEndpoint is same as RegisterAccountServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAccountServiceHandlerServer

func RegisterAccountServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccountServiceServer) error

RegisterAccountServiceHandlerServer registers the http handlers for service AccountService to "mux". UnaryRPC :call AccountServiceServer 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 RegisterAccountServiceHandlerFromEndpoint instead.

func RegisterAccountServiceServer

func RegisterAccountServiceServer(s grpc.ServiceRegistrar, srv AccountServiceServer)

Types

type Account

type Account struct {
	Id             int32                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name           string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Charname       string                 `protobuf:"bytes,3,opt,name=charname,proto3" json:"charname,omitempty"`
	Sharedplat     int32                  `protobuf:"varint,4,opt,name=sharedplat,proto3" json:"sharedplat,omitempty"`
	Password       string                 `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"`
	Status         int32                  `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"`
	LsId           string                 `protobuf:"bytes,7,opt,name=ls_id,json=lsId,proto3" json:"ls_id,omitempty"`
	LsaccountId    int32                  `protobuf:"varint,8,opt,name=lsaccount_id,json=lsaccountId,proto3" json:"lsaccount_id,omitempty"`
	Gmspeed        int32                  `protobuf:"varint,9,opt,name=gmspeed,proto3" json:"gmspeed,omitempty"`
	Invulnerable   bool                   `protobuf:"varint,10,opt,name=invulnerable,proto3" json:"invulnerable,omitempty"`
	Flymode        bool                   `protobuf:"varint,11,opt,name=flymode,proto3" json:"flymode,omitempty"`
	IgnoreTells    bool                   `protobuf:"varint,12,opt,name=ignore_tells,json=ignoreTells,proto3" json:"ignore_tells,omitempty"`
	Revoked        bool                   `protobuf:"varint,13,opt,name=revoked,proto3" json:"revoked,omitempty"`
	Karma          int32                  `protobuf:"varint,14,opt,name=karma,proto3" json:"karma,omitempty"`
	MiniloginIp    string                 `protobuf:"bytes,15,opt,name=minilogin_ip,json=miniloginIp,proto3" json:"minilogin_ip,omitempty"`
	Hideme         bool                   `protobuf:"varint,16,opt,name=hideme,proto3" json:"hideme,omitempty"`
	Rulesflag      bool                   `protobuf:"varint,17,opt,name=rulesflag,proto3" json:"rulesflag,omitempty"`
	Suspendeduntil *timestamppb.Timestamp `protobuf:"bytes,18,opt,name=suspendeduntil,proto3" json:"suspendeduntil,omitempty"`
	TimeCreation   *timestamppb.Timestamp `protobuf:"bytes,19,opt,name=time_creation,json=timeCreation,proto3" json:"time_creation,omitempty"`
	BanReason      string                 `protobuf:"bytes,20,opt,name=ban_reason,json=banReason,proto3" json:"ban_reason,omitempty"`
	SuspendReason  string                 `protobuf:"bytes,21,opt,name=suspend_reason,json=suspendReason,proto3" json:"suspend_reason,omitempty"`
	Ips            []*AccountIP           `protobuf:"bytes,22,rep,name=ips,proto3" json:"ips,omitempty"`
	// contains filtered or unexported fields
}

func (*Account) Descriptor deprecated

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

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetBanReason

func (x *Account) GetBanReason() string

func (*Account) GetCharname

func (x *Account) GetCharname() string

func (*Account) GetFlymode

func (x *Account) GetFlymode() bool

func (*Account) GetGmspeed

func (x *Account) GetGmspeed() int32

func (*Account) GetHideme

func (x *Account) GetHideme() bool

func (*Account) GetId

func (x *Account) GetId() int32

func (*Account) GetIgnoreTells

func (x *Account) GetIgnoreTells() bool

func (*Account) GetInvulnerable

func (x *Account) GetInvulnerable() bool

func (*Account) GetIps

func (x *Account) GetIps() []*AccountIP

func (*Account) GetKarma

func (x *Account) GetKarma() int32

func (*Account) GetLsId

func (x *Account) GetLsId() string

func (*Account) GetLsaccountId

func (x *Account) GetLsaccountId() int32

func (*Account) GetMiniloginIp

func (x *Account) GetMiniloginIp() string

func (*Account) GetName

func (x *Account) GetName() string

func (*Account) GetPassword

func (x *Account) GetPassword() string

func (*Account) GetRevoked

func (x *Account) GetRevoked() bool

func (*Account) GetRulesflag

func (x *Account) GetRulesflag() bool

func (*Account) GetSharedplat

func (x *Account) GetSharedplat() int32

func (*Account) GetStatus

func (x *Account) GetStatus() int32

func (*Account) GetSuspendReason

func (x *Account) GetSuspendReason() string

func (*Account) GetSuspendeduntil

func (x *Account) GetSuspendeduntil() *timestamppb.Timestamp

func (*Account) GetTimeCreation

func (x *Account) GetTimeCreation() *timestamppb.Timestamp

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) ProtoReflect

func (x *Account) ProtoReflect() protoreflect.Message

func (*Account) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

type AccountIP

type AccountIP struct {
	AccountId int32                  `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	Ip        string                 `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
	Count     int32                  `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
	LastUsed  *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_used,json=lastUsed,proto3" json:"last_used,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountIP) Descriptor deprecated

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

Deprecated: Use AccountIP.ProtoReflect.Descriptor instead.

func (*AccountIP) GetAccountId

func (x *AccountIP) GetAccountId() int32

func (*AccountIP) GetCount

func (x *AccountIP) GetCount() int32

func (*AccountIP) GetIp

func (x *AccountIP) GetIp() string

func (*AccountIP) GetLastUsed

func (x *AccountIP) GetLastUsed() *timestamppb.Timestamp

func (*AccountIP) ProtoMessage

func (*AccountIP) ProtoMessage()

func (*AccountIP) ProtoReflect

func (x *AccountIP) ProtoReflect() protoreflect.Message

func (*AccountIP) Reset

func (x *AccountIP) Reset()

func (*AccountIP) String

func (x *AccountIP) String() string

type AccountServiceClient

type AccountServiceClient interface {
	ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (AccountService_ListAccountsClient, error)
	CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error)
	GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error)
	UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error)
	DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*DeleteAccountResponse, error)
}

AccountServiceClient is the client API for AccountService 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.

type AccountServiceServer

AccountServiceServer is the server API for AccountService service. All implementations should embed UnimplementedAccountServiceServer for forward compatibility

type AccountService_ListAccountsClient

type AccountService_ListAccountsClient interface {
	Recv() (*ListAccountsResponse, error)
	grpc.ClientStream
}

type AccountService_ListAccountsServer

type AccountService_ListAccountsServer interface {
	Send(*ListAccountsResponse) error
	grpc.ServerStream
}

type CreateAccountRequest

type CreateAccountRequest struct {
	Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateAccountRequest) Descriptor deprecated

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

Deprecated: Use CreateAccountRequest.ProtoReflect.Descriptor instead.

func (*CreateAccountRequest) GetAccount

func (x *CreateAccountRequest) GetAccount() *Account

func (*CreateAccountRequest) ProtoMessage

func (*CreateAccountRequest) ProtoMessage()

func (*CreateAccountRequest) ProtoReflect

func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message

func (*CreateAccountRequest) Reset

func (x *CreateAccountRequest) Reset()

func (*CreateAccountRequest) String

func (x *CreateAccountRequest) String() string

type CreateAccountResponse

type CreateAccountResponse struct {
	Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateAccountResponse) Descriptor deprecated

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

Deprecated: Use CreateAccountResponse.ProtoReflect.Descriptor instead.

func (*CreateAccountResponse) GetAccount

func (x *CreateAccountResponse) GetAccount() *Account

func (*CreateAccountResponse) ProtoMessage

func (*CreateAccountResponse) ProtoMessage()

func (*CreateAccountResponse) ProtoReflect

func (x *CreateAccountResponse) ProtoReflect() protoreflect.Message

func (*CreateAccountResponse) Reset

func (x *CreateAccountResponse) Reset()

func (*CreateAccountResponse) String

func (x *CreateAccountResponse) String() string

type DeleteAccountRequest

type DeleteAccountRequest struct {
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteAccountRequest) Descriptor deprecated

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

Deprecated: Use DeleteAccountRequest.ProtoReflect.Descriptor instead.

func (*DeleteAccountRequest) GetId

func (x *DeleteAccountRequest) GetId() int32

func (*DeleteAccountRequest) ProtoMessage

func (*DeleteAccountRequest) ProtoMessage()

func (*DeleteAccountRequest) ProtoReflect

func (x *DeleteAccountRequest) ProtoReflect() protoreflect.Message

func (*DeleteAccountRequest) Reset

func (x *DeleteAccountRequest) Reset()

func (*DeleteAccountRequest) String

func (x *DeleteAccountRequest) String() string

type DeleteAccountResponse

type DeleteAccountResponse struct {
	Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteAccountResponse) Descriptor deprecated

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

Deprecated: Use DeleteAccountResponse.ProtoReflect.Descriptor instead.

func (*DeleteAccountResponse) GetAccount

func (x *DeleteAccountResponse) GetAccount() *Account

func (*DeleteAccountResponse) ProtoMessage

func (*DeleteAccountResponse) ProtoMessage()

func (*DeleteAccountResponse) ProtoReflect

func (x *DeleteAccountResponse) ProtoReflect() protoreflect.Message

func (*DeleteAccountResponse) Reset

func (x *DeleteAccountResponse) Reset()

func (*DeleteAccountResponse) String

func (x *DeleteAccountResponse) String() string

type GetAccountRequest

type GetAccountRequest struct {
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAccountRequest) Descriptor deprecated

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

Deprecated: Use GetAccountRequest.ProtoReflect.Descriptor instead.

func (*GetAccountRequest) GetId

func (x *GetAccountRequest) GetId() int32

func (*GetAccountRequest) ProtoMessage

func (*GetAccountRequest) ProtoMessage()

func (*GetAccountRequest) ProtoReflect

func (x *GetAccountRequest) ProtoReflect() protoreflect.Message

func (*GetAccountRequest) Reset

func (x *GetAccountRequest) Reset()

func (*GetAccountRequest) String

func (x *GetAccountRequest) String() string

type GetAccountResponse

type GetAccountResponse struct {
	Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAccountResponse) Descriptor deprecated

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

Deprecated: Use GetAccountResponse.ProtoReflect.Descriptor instead.

func (*GetAccountResponse) GetAccount

func (x *GetAccountResponse) GetAccount() *Account

func (*GetAccountResponse) ProtoMessage

func (*GetAccountResponse) ProtoMessage()

func (*GetAccountResponse) ProtoReflect

func (x *GetAccountResponse) ProtoReflect() protoreflect.Message

func (*GetAccountResponse) Reset

func (x *GetAccountResponse) Reset()

func (*GetAccountResponse) String

func (x *GetAccountResponse) String() string

type ListAccountsRequest

type ListAccountsRequest struct {
	// contains filtered or unexported fields
}

func (*ListAccountsRequest) Descriptor deprecated

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

Deprecated: Use ListAccountsRequest.ProtoReflect.Descriptor instead.

func (*ListAccountsRequest) ProtoMessage

func (*ListAccountsRequest) ProtoMessage()

func (*ListAccountsRequest) ProtoReflect

func (x *ListAccountsRequest) ProtoReflect() protoreflect.Message

func (*ListAccountsRequest) Reset

func (x *ListAccountsRequest) Reset()

func (*ListAccountsRequest) String

func (x *ListAccountsRequest) String() string

type ListAccountsResponse

type ListAccountsResponse struct {
	Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// contains filtered or unexported fields
}

func (*ListAccountsResponse) Descriptor deprecated

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

Deprecated: Use ListAccountsResponse.ProtoReflect.Descriptor instead.

func (*ListAccountsResponse) GetAccount

func (x *ListAccountsResponse) GetAccount() *Account

func (*ListAccountsResponse) ProtoMessage

func (*ListAccountsResponse) ProtoMessage()

func (*ListAccountsResponse) ProtoReflect

func (x *ListAccountsResponse) ProtoReflect() protoreflect.Message

func (*ListAccountsResponse) Reset

func (x *ListAccountsResponse) Reset()

func (*ListAccountsResponse) String

func (x *ListAccountsResponse) String() string

type UnimplementedAccountServiceServer

type UnimplementedAccountServiceServer struct {
}

UnimplementedAccountServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedAccountServiceServer) CreateAccount

func (UnimplementedAccountServiceServer) DeleteAccount

func (UnimplementedAccountServiceServer) GetAccount

func (UnimplementedAccountServiceServer) ListAccounts

func (UnimplementedAccountServiceServer) UpdateAccount

type UnsafeAccountServiceServer

type UnsafeAccountServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAccountServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AccountServiceServer will result in compilation errors.

type UpdateAccountRequest

type UpdateAccountRequest struct {
	Id      int32    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Account *Account `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateAccountRequest) Descriptor deprecated

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

Deprecated: Use UpdateAccountRequest.ProtoReflect.Descriptor instead.

func (*UpdateAccountRequest) GetAccount

func (x *UpdateAccountRequest) GetAccount() *Account

func (*UpdateAccountRequest) GetId

func (x *UpdateAccountRequest) GetId() int32

func (*UpdateAccountRequest) ProtoMessage

func (*UpdateAccountRequest) ProtoMessage()

func (*UpdateAccountRequest) ProtoReflect

func (x *UpdateAccountRequest) ProtoReflect() protoreflect.Message

func (*UpdateAccountRequest) Reset

func (x *UpdateAccountRequest) Reset()

func (*UpdateAccountRequest) String

func (x *UpdateAccountRequest) String() string

type UpdateAccountResponse

type UpdateAccountResponse struct {
	Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateAccountResponse) Descriptor deprecated

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

Deprecated: Use UpdateAccountResponse.ProtoReflect.Descriptor instead.

func (*UpdateAccountResponse) GetAccount

func (x *UpdateAccountResponse) GetAccount() *Account

func (*UpdateAccountResponse) ProtoMessage

func (*UpdateAccountResponse) ProtoMessage()

func (*UpdateAccountResponse) ProtoReflect

func (x *UpdateAccountResponse) ProtoReflect() protoreflect.Message

func (*UpdateAccountResponse) Reset

func (x *UpdateAccountResponse) Reset()

func (*UpdateAccountResponse) String

func (x *UpdateAccountResponse) String() string

Jump to

Keyboard shortcuts

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