gateway

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_goblog_gateway_v1_service_proto protoreflect.FileDescriptor

Functions

func RegisterGatewayServiceServer

func RegisterGatewayServiceServer(s grpc.ServiceRegistrar, srv GatewayServiceServer)

Types

type DeleteUserRequest

type DeleteUserRequest struct {

	// Required. The unique identifier for the user as an email address. Must be an existent user.
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

Request message for [GatewayService.DeleteUser][goblog.gateway.v1.GatewayService.DeleteUser]

func (*DeleteUserRequest) Descriptor deprecated

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

Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.

func (*DeleteUserRequest) GetEmail

func (x *DeleteUserRequest) GetEmail() string

func (*DeleteUserRequest) ProtoMessage

func (*DeleteUserRequest) ProtoMessage()

func (*DeleteUserRequest) ProtoReflect

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

func (*DeleteUserRequest) Reset

func (x *DeleteUserRequest) Reset()

func (*DeleteUserRequest) String

func (x *DeleteUserRequest) String() string

type GatewayServiceClient

type GatewayServiceClient interface {
	// Create a new [goblog.auth.v1.User] with the given [goblog.auth.v1.UserCredential] and the associated [goblog.post.v1.Author].
	RegisterUser(ctx context.Context, in *RegisterUserRequest, opts ...grpc.CallOption) (*RegisterUserResponse, error)
	// Update an [goblog.auth.v1.User] and the associated [goblog.post.v1.Author].
	UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error)
	// Create a [goblog.auth.v1.User] with the given [goblog.auth.v1.UserCredential] and the associated [goblog.post.v1.Author].
	DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Get user details, with [goblog.auth.v1.User], [goblog.post.v1.Author] and [goblog.post.v1.Post] list.
	GetUserDetails(ctx context.Context, in *GetUserDetailsRequest, opts ...grpc.CallOption) (*GetUserDetailsResponse, error)
}

GatewayServiceClient is the client API for GatewayService 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 GatewayServiceServer

type GatewayServiceServer interface {
	// Create a new [goblog.auth.v1.User] with the given [goblog.auth.v1.UserCredential] and the associated [goblog.post.v1.Author].
	RegisterUser(context.Context, *RegisterUserRequest) (*RegisterUserResponse, error)
	// Update an [goblog.auth.v1.User] and the associated [goblog.post.v1.Author].
	UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)
	// Create a [goblog.auth.v1.User] with the given [goblog.auth.v1.UserCredential] and the associated [goblog.post.v1.Author].
	DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
	// Get user details, with [goblog.auth.v1.User], [goblog.post.v1.Author] and [goblog.post.v1.Post] list.
	GetUserDetails(context.Context, *GetUserDetailsRequest) (*GetUserDetailsResponse, error)
	// contains filtered or unexported methods
}

GatewayServiceServer is the server API for GatewayService service. All implementations must embed UnimplementedGatewayServiceServer for forward compatibility

type GetUserDetailsRequest

type GetUserDetailsRequest struct {

	// Required. The unique identifier for the user as an email address. Must be a valid email address.
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

Request message for [GatewayService.GetUserDetails][goblog.gateway.v1.GatewayService.GetUserDetails]

func (*GetUserDetailsRequest) Descriptor deprecated

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

Deprecated: Use GetUserDetailsRequest.ProtoReflect.Descriptor instead.

func (*GetUserDetailsRequest) GetEmail

func (x *GetUserDetailsRequest) GetEmail() string

func (*GetUserDetailsRequest) ProtoMessage

func (*GetUserDetailsRequest) ProtoMessage()

func (*GetUserDetailsRequest) ProtoReflect

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

func (*GetUserDetailsRequest) Reset

func (x *GetUserDetailsRequest) Reset()

func (*GetUserDetailsRequest) String

func (x *GetUserDetailsRequest) String() string

type GetUserDetailsResponse

type GetUserDetailsResponse struct {

	// Required. The unique identifier for the user.
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// Optional. The name for human-friendly display. If omitted, it will be set to the email @ prefix.
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// Creation timestamp.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Update timestamp.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// The user post list.
	Posts []*GetUserDetailsResponse_Post `protobuf:"bytes,5,rep,name=posts,proto3" json:"posts,omitempty"`
	// contains filtered or unexported fields
}

Response message for [GatewayService.GetUserDetails][goblog.gateway.v1.GatewayService.GetUserDetails]

func (*GetUserDetailsResponse) Descriptor deprecated

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

Deprecated: Use GetUserDetailsResponse.ProtoReflect.Descriptor instead.

func (*GetUserDetailsResponse) GetCreatedAt

func (x *GetUserDetailsResponse) GetCreatedAt() *timestamppb.Timestamp

func (*GetUserDetailsResponse) GetEmail

func (x *GetUserDetailsResponse) GetEmail() string

func (*GetUserDetailsResponse) GetPosts

func (*GetUserDetailsResponse) GetUpdatedAt

func (x *GetUserDetailsResponse) GetUpdatedAt() *timestamppb.Timestamp

func (*GetUserDetailsResponse) GetUsername

func (x *GetUserDetailsResponse) GetUsername() string

func (*GetUserDetailsResponse) ProtoMessage

func (*GetUserDetailsResponse) ProtoMessage()

func (*GetUserDetailsResponse) ProtoReflect

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

func (*GetUserDetailsResponse) Reset

func (x *GetUserDetailsResponse) Reset()

func (*GetUserDetailsResponse) String

func (x *GetUserDetailsResponse) String() string

type GetUserDetailsResponse_Post

type GetUserDetailsResponse_Post struct {

	// The unique identifier for the post.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The slug URI used to access the post.
	Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"`
	// The post title.
	Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
	// Creation timestamp.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Update timestamp.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

The [GatewayService.GetUserDetailsResponse][goblog.gateway.v1.GatewayService.GetUserDetailsResponse] Post details.

func (*GetUserDetailsResponse_Post) Descriptor deprecated

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

Deprecated: Use GetUserDetailsResponse_Post.ProtoReflect.Descriptor instead.

func (*GetUserDetailsResponse_Post) GetCreatedAt

func (*GetUserDetailsResponse_Post) GetId

func (*GetUserDetailsResponse_Post) GetSlug

func (x *GetUserDetailsResponse_Post) GetSlug() string

func (*GetUserDetailsResponse_Post) GetTitle

func (x *GetUserDetailsResponse_Post) GetTitle() string

func (*GetUserDetailsResponse_Post) GetUpdatedAt

func (*GetUserDetailsResponse_Post) ProtoMessage

func (*GetUserDetailsResponse_Post) ProtoMessage()

func (*GetUserDetailsResponse_Post) ProtoReflect

func (*GetUserDetailsResponse_Post) Reset

func (x *GetUserDetailsResponse_Post) Reset()

func (*GetUserDetailsResponse_Post) String

func (x *GetUserDetailsResponse_Post) String() string

type RegisterUserRequest

type RegisterUserRequest struct {

	// Required. The unique identifier for the user as an email address. Must be a valid email address.
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// Optional. The name for human-friendly display. If omitted, it will be set to the email @ prefix.
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// Required. The type of credential used for user connection.
	CredentialType v1.UserCredential_CredentialType `` /* 154-byte string literal not displayed */
	// Required. The credential for the user.
	Credential string `protobuf:"bytes,4,opt,name=credential,proto3" json:"credential,omitempty"`
	// contains filtered or unexported fields
}

Request message for [GatewayService.RegisterUser][goblog.gateway.v1.GatewayService.RegisterUser]

func (*RegisterUserRequest) Descriptor deprecated

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

Deprecated: Use RegisterUserRequest.ProtoReflect.Descriptor instead.

func (*RegisterUserRequest) GetCredential

func (x *RegisterUserRequest) GetCredential() string

func (*RegisterUserRequest) GetCredentialType

func (x *RegisterUserRequest) GetCredentialType() v1.UserCredential_CredentialType

func (*RegisterUserRequest) GetEmail

func (x *RegisterUserRequest) GetEmail() string

func (*RegisterUserRequest) GetUsername

func (x *RegisterUserRequest) GetUsername() string

func (*RegisterUserRequest) ProtoMessage

func (*RegisterUserRequest) ProtoMessage()

func (*RegisterUserRequest) ProtoReflect

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

func (*RegisterUserRequest) Reset

func (x *RegisterUserRequest) Reset()

func (*RegisterUserRequest) String

func (x *RegisterUserRequest) String() string

type RegisterUserResponse

type RegisterUserResponse struct {

	// The unique identifier for the newly created user.
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// The name for human-friendly display.
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// Creation timestamp.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Response message for [GatewayService.RegisterUser][goblog.gateway.v1.GatewayService.RegisterUser]

func (*RegisterUserResponse) Descriptor deprecated

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

Deprecated: Use RegisterUserResponse.ProtoReflect.Descriptor instead.

func (*RegisterUserResponse) GetCreatedAt

func (x *RegisterUserResponse) GetCreatedAt() *timestamppb.Timestamp

func (*RegisterUserResponse) GetEmail

func (x *RegisterUserResponse) GetEmail() string

func (*RegisterUserResponse) GetUsername

func (x *RegisterUserResponse) GetUsername() string

func (*RegisterUserResponse) ProtoMessage

func (*RegisterUserResponse) ProtoMessage()

func (*RegisterUserResponse) ProtoReflect

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

func (*RegisterUserResponse) Reset

func (x *RegisterUserResponse) Reset()

func (*RegisterUserResponse) String

func (x *RegisterUserResponse) String() string

type UnimplementedGatewayServiceServer

type UnimplementedGatewayServiceServer struct {
}

UnimplementedGatewayServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedGatewayServiceServer) DeleteUser

func (UnimplementedGatewayServiceServer) GetUserDetails

func (UnimplementedGatewayServiceServer) RegisterUser

func (UnimplementedGatewayServiceServer) UpdateUser

type UnsafeGatewayServiceServer

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

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

type UpdateUserRequest

type UpdateUserRequest struct {

	// Required. The unique identifier for the user as an email address. Must be an existent user.
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// Optional. The name for human-friendly display. If omitted, it will be set to the email @ prefix.
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

Request message for [GatewayService.UpdateUser][goblog.gateway.v1.GatewayService.UpdateUser]

func (*UpdateUserRequest) Descriptor deprecated

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

Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.

func (*UpdateUserRequest) GetEmail

func (x *UpdateUserRequest) GetEmail() string

func (*UpdateUserRequest) GetUsername

func (x *UpdateUserRequest) GetUsername() string

func (*UpdateUserRequest) ProtoMessage

func (*UpdateUserRequest) ProtoMessage()

func (*UpdateUserRequest) ProtoReflect

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

func (*UpdateUserRequest) Reset

func (x *UpdateUserRequest) Reset()

func (*UpdateUserRequest) String

func (x *UpdateUserRequest) String() string

type UpdateUserResponse

type UpdateUserResponse struct {

	// The unique identifier for the updated user.
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// The name for human-friendly display.
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// Update timestamp.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Response message for [GatewayService.UpdateUser][goblog.gateway.v1.GatewayService.UpdateUser]

func (*UpdateUserResponse) Descriptor deprecated

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

Deprecated: Use UpdateUserResponse.ProtoReflect.Descriptor instead.

func (*UpdateUserResponse) GetEmail

func (x *UpdateUserResponse) GetEmail() string

func (*UpdateUserResponse) GetUpdatedAt

func (x *UpdateUserResponse) GetUpdatedAt() *timestamppb.Timestamp

func (*UpdateUserResponse) GetUsername

func (x *UpdateUserResponse) GetUsername() string

func (*UpdateUserResponse) ProtoMessage

func (*UpdateUserResponse) ProtoMessage()

func (*UpdateUserResponse) ProtoReflect

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

func (*UpdateUserResponse) Reset

func (x *UpdateUserResponse) Reset()

func (*UpdateUserResponse) String

func (x *UpdateUserResponse) String() string

Jump to

Keyboard shortcuts

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