accountsvc

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package accountsvc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var Accounts_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "autokitteh.accountsvc.Accounts",
	HandlerType: (*AccountsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateAccount",
			Handler:    _Accounts_CreateAccount_Handler,
		},
		{
			MethodName: "UpdateAccount",
			Handler:    _Accounts_UpdateAccount_Handler,
		},
		{
			MethodName: "GetAccount",
			Handler:    _Accounts_GetAccount_Handler,
		},
		{
			MethodName: "GetAccounts",
			Handler:    _Accounts_GetAccounts_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "accountsvc/svc.proto",
}

Accounts_ServiceDesc is the grpc.ServiceDesc for Accounts 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_accountsvc_svc_proto protoreflect.FileDescriptor

Functions

func RegisterAccountsHandler

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

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

func RegisterAccountsHandlerClient

func RegisterAccountsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccountsClient) error

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

func RegisterAccountsHandlerFromEndpoint

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

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

func RegisterAccountsHandlerServer

func RegisterAccountsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccountsServer) error

RegisterAccountsHandlerServer registers the http handlers for service Accounts to "mux". UnaryRPC :call AccountsServer 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 RegisterAccountsHandlerFromEndpoint instead.

func RegisterAccountsServer

func RegisterAccountsServer(s grpc.ServiceRegistrar, srv AccountsServer)

Types

type AccountsClient

type AccountsClient interface {
	CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error)
	UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error)
	GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error)
	GetAccounts(ctx context.Context, in *GetAccountsRequest, opts ...grpc.CallOption) (*GetAccountsResponse, error)
}

AccountsClient is the client API for Accounts 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 NewAccountsClient

func NewAccountsClient(cc grpc.ClientConnInterface) AccountsClient

type AccountsServer

type AccountsServer interface {
	CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error)
	UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error)
	GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error)
	GetAccounts(context.Context, *GetAccountsRequest) (*GetAccountsResponse, error)
	// contains filtered or unexported methods
}

AccountsServer is the server API for Accounts service. All implementations must embed UnimplementedAccountsServer for forward compatibility

type CreateAccountRequest

type CreateAccountRequest struct {
	Name     string                   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Settings *account.AccountSettings `protobuf:"bytes,2,opt,name=settings,proto3" json:"settings,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateAccountRequest) Descriptor deprecated

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

Deprecated: Use CreateAccountRequest.ProtoReflect.Descriptor instead.

func (*CreateAccountRequest) GetName

func (x *CreateAccountRequest) GetName() string

func (*CreateAccountRequest) GetSettings

func (x *CreateAccountRequest) GetSettings() *account.AccountSettings

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

func (*CreateAccountRequest) Validate

func (m *CreateAccountRequest) Validate() error

Validate checks the field values on CreateAccountRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type CreateAccountRequestValidationError

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

CreateAccountRequestValidationError is the validation error returned by CreateAccountRequest.Validate if the designated constraints aren't met.

func (CreateAccountRequestValidationError) Cause

Cause function returns cause value.

func (CreateAccountRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateAccountRequestValidationError) ErrorName

ErrorName returns error name.

func (CreateAccountRequestValidationError) Field

Field function returns field value.

func (CreateAccountRequestValidationError) Key

Key function returns key value.

func (CreateAccountRequestValidationError) Reason

Reason function returns reason value.

type CreateAccountResponse

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

func (*CreateAccountResponse) Descriptor deprecated

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

Deprecated: Use CreateAccountResponse.ProtoReflect.Descriptor instead.

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

func (*CreateAccountResponse) Validate

func (m *CreateAccountResponse) Validate() error

Validate checks the field values on CreateAccountResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type CreateAccountResponseValidationError

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

CreateAccountResponseValidationError is the validation error returned by CreateAccountResponse.Validate if the designated constraints aren't met.

func (CreateAccountResponseValidationError) Cause

Cause function returns cause value.

func (CreateAccountResponseValidationError) Error

Error satisfies the builtin error interface

func (CreateAccountResponseValidationError) ErrorName

ErrorName returns error name.

func (CreateAccountResponseValidationError) Field

Field function returns field value.

func (CreateAccountResponseValidationError) Key

Key function returns key value.

func (CreateAccountResponseValidationError) Reason

Reason function returns reason value.

type GetAccountRequest

type GetAccountRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAccountRequest) Descriptor deprecated

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

Deprecated: Use GetAccountRequest.ProtoReflect.Descriptor instead.

func (*GetAccountRequest) GetName

func (x *GetAccountRequest) GetName() string

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

func (*GetAccountRequest) Validate

func (m *GetAccountRequest) Validate() error

Validate checks the field values on GetAccountRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetAccountRequestValidationError

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

GetAccountRequestValidationError is the validation error returned by GetAccountRequest.Validate if the designated constraints aren't met.

func (GetAccountRequestValidationError) Cause

Cause function returns cause value.

func (GetAccountRequestValidationError) Error

Error satisfies the builtin error interface

func (GetAccountRequestValidationError) ErrorName

ErrorName returns error name.

func (GetAccountRequestValidationError) Field

Field function returns field value.

func (GetAccountRequestValidationError) Key

Key function returns key value.

func (GetAccountRequestValidationError) Reason

Reason function returns reason value.

type GetAccountResponse

type GetAccountResponse struct {
	Account *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.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

func (*GetAccountResponse) Validate

func (m *GetAccountResponse) Validate() error

Validate checks the field values on GetAccountResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetAccountResponseValidationError

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

GetAccountResponseValidationError is the validation error returned by GetAccountResponse.Validate if the designated constraints aren't met.

func (GetAccountResponseValidationError) Cause

Cause function returns cause value.

func (GetAccountResponseValidationError) Error

Error satisfies the builtin error interface

func (GetAccountResponseValidationError) ErrorName

ErrorName returns error name.

func (GetAccountResponseValidationError) Field

Field function returns field value.

func (GetAccountResponseValidationError) Key

Key function returns key value.

func (GetAccountResponseValidationError) Reason

Reason function returns reason value.

type GetAccountsRequest

type GetAccountsRequest struct {
	Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAccountsRequest) Descriptor deprecated

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

Deprecated: Use GetAccountsRequest.ProtoReflect.Descriptor instead.

func (*GetAccountsRequest) GetNames

func (x *GetAccountsRequest) GetNames() []string

func (*GetAccountsRequest) ProtoMessage

func (*GetAccountsRequest) ProtoMessage()

func (*GetAccountsRequest) ProtoReflect

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

func (*GetAccountsRequest) Reset

func (x *GetAccountsRequest) Reset()

func (*GetAccountsRequest) String

func (x *GetAccountsRequest) String() string

func (*GetAccountsRequest) Validate

func (m *GetAccountsRequest) Validate() error

Validate checks the field values on GetAccountsRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetAccountsRequestValidationError

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

GetAccountsRequestValidationError is the validation error returned by GetAccountsRequest.Validate if the designated constraints aren't met.

func (GetAccountsRequestValidationError) Cause

Cause function returns cause value.

func (GetAccountsRequestValidationError) Error

Error satisfies the builtin error interface

func (GetAccountsRequestValidationError) ErrorName

ErrorName returns error name.

func (GetAccountsRequestValidationError) Field

Field function returns field value.

func (GetAccountsRequestValidationError) Key

Key function returns key value.

func (GetAccountsRequestValidationError) Reason

Reason function returns reason value.

type GetAccountsResponse

type GetAccountsResponse struct {
	Accounts []*account.Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAccountsResponse) Descriptor deprecated

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

Deprecated: Use GetAccountsResponse.ProtoReflect.Descriptor instead.

func (*GetAccountsResponse) GetAccounts

func (x *GetAccountsResponse) GetAccounts() []*account.Account

func (*GetAccountsResponse) ProtoMessage

func (*GetAccountsResponse) ProtoMessage()

func (*GetAccountsResponse) ProtoReflect

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

func (*GetAccountsResponse) Reset

func (x *GetAccountsResponse) Reset()

func (*GetAccountsResponse) String

func (x *GetAccountsResponse) String() string

func (*GetAccountsResponse) Validate

func (m *GetAccountsResponse) Validate() error

Validate checks the field values on GetAccountsResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetAccountsResponseValidationError

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

GetAccountsResponseValidationError is the validation error returned by GetAccountsResponse.Validate if the designated constraints aren't met.

func (GetAccountsResponseValidationError) Cause

Cause function returns cause value.

func (GetAccountsResponseValidationError) Error

Error satisfies the builtin error interface

func (GetAccountsResponseValidationError) ErrorName

ErrorName returns error name.

func (GetAccountsResponseValidationError) Field

Field function returns field value.

func (GetAccountsResponseValidationError) Key

Key function returns key value.

func (GetAccountsResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedAccountsServer

type UnimplementedAccountsServer struct {
}

UnimplementedAccountsServer must be embedded to have forward compatible implementations.

func (UnimplementedAccountsServer) CreateAccount

func (UnimplementedAccountsServer) GetAccount

func (UnimplementedAccountsServer) GetAccounts

func (UnimplementedAccountsServer) UpdateAccount

type UnsafeAccountsServer

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

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

type UpdateAccountRequest

type UpdateAccountRequest struct {
	Name     string                   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Settings *account.AccountSettings `protobuf:"bytes,2,opt,name=settings,proto3" json:"settings,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateAccountRequest) Descriptor deprecated

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

Deprecated: Use UpdateAccountRequest.ProtoReflect.Descriptor instead.

func (*UpdateAccountRequest) GetName

func (x *UpdateAccountRequest) GetName() string

func (*UpdateAccountRequest) GetSettings

func (x *UpdateAccountRequest) GetSettings() *account.AccountSettings

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

func (*UpdateAccountRequest) Validate

func (m *UpdateAccountRequest) Validate() error

Validate checks the field values on UpdateAccountRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type UpdateAccountRequestValidationError

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

UpdateAccountRequestValidationError is the validation error returned by UpdateAccountRequest.Validate if the designated constraints aren't met.

func (UpdateAccountRequestValidationError) Cause

Cause function returns cause value.

func (UpdateAccountRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateAccountRequestValidationError) ErrorName

ErrorName returns error name.

func (UpdateAccountRequestValidationError) Field

Field function returns field value.

func (UpdateAccountRequestValidationError) Key

Key function returns key value.

func (UpdateAccountRequestValidationError) Reason

Reason function returns reason value.

type UpdateAccountResponse

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

func (*UpdateAccountResponse) Descriptor deprecated

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

Deprecated: Use UpdateAccountResponse.ProtoReflect.Descriptor instead.

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

func (*UpdateAccountResponse) Validate

func (m *UpdateAccountResponse) Validate() error

Validate checks the field values on UpdateAccountResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type UpdateAccountResponseValidationError

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

UpdateAccountResponseValidationError is the validation error returned by UpdateAccountResponse.Validate if the designated constraints aren't met.

func (UpdateAccountResponseValidationError) Cause

Cause function returns cause value.

func (UpdateAccountResponseValidationError) Error

Error satisfies the builtin error interface

func (UpdateAccountResponseValidationError) ErrorName

ErrorName returns error name.

func (UpdateAccountResponseValidationError) Field

Field function returns field value.

func (UpdateAccountResponseValidationError) Key

Key function returns key value.

func (UpdateAccountResponseValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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