pb

package
v0.0.0-...-e5acbb5 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 37 Imported by: 1

Documentation

Overview

Code generated by proroc-gen-graphql, DO NOT EDIT.

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_pb_user_profile_int_proto protoreflect.FileDescriptor
View Source
var File_pb_user_profile_proto protoreflect.FileDescriptor

Functions

func Gql__input_GetUserProfileBySubRequest

func Gql__input_GetUserProfileBySubRequest() *graphql.InputObject

func Gql__input_UserProfile

func Gql__input_UserProfile() *graphql.InputObject

func Gql__type_GetUserProfileBySubRequest

func Gql__type_GetUserProfileBySubRequest() *graphql.Object

func Gql__type_UserProfile

func Gql__type_UserProfile() *graphql.Object

func RegisterUserProfileInternalServer

func RegisterUserProfileInternalServer(s *grpc.Server, srv UserProfileInternalServer)

func RegisterUserProfilesGraphql

func RegisterUserProfilesGraphql(mux *runtime.ServeMux) error

Register package divided graphql handler "without" *grpc.ClientConn, therefore gRPC connection will be opened and closed automatically. Occasionally you may worry about open/close performance for each handling graphql request, then you can call RegisterUserProfilesGraphqlHandler with *grpc.ClientConn manually.

func RegisterUserProfilesGraphqlHandler

func RegisterUserProfilesGraphqlHandler(mux *runtime.ServeMux, conn *grpc.ClientConn) error

Register package divided graphql handler "with" *grpc.ClientConn. this function accepts your defined grpc connection, so that we reuse that and never close connection inside. You need to close it maunally when application will terminate. Otherwise, you can specify automatic opening connection with ServiceOption directive:

service UserProfiles {
   option (graphql.service) = {
       host: "host:port"
       insecure: true or false
   };

   ...with RPC definitions
}

func RegisterUserProfilesHandler

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

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

func RegisterUserProfilesHandlerClient

func RegisterUserProfilesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserProfilesClient) error

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

func RegisterUserProfilesHandlerFromEndpoint

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

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

func RegisterUserProfilesHandlerServer

func RegisterUserProfilesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserProfilesServer) error

RegisterUserProfilesHandlerServer registers the http handlers for service UserProfiles to "mux". UnaryRPC :call UserProfilesServer 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 RegisterUserProfilesHandlerFromEndpoint instead.

func RegisterUserProfilesServer

func RegisterUserProfilesServer(s *grpc.Server, srv UserProfilesServer)

Types

type CreateUserProfileRequest

type CreateUserProfileRequest struct {
	UserProfile *UserProfile `protobuf:"bytes,1,opt,name=user_profile,json=userProfile,proto3" json:"user_profile,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserProfileRequest) Descriptor deprecated

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

Deprecated: Use CreateUserProfileRequest.ProtoReflect.Descriptor instead.

func (*CreateUserProfileRequest) GetUserProfile

func (x *CreateUserProfileRequest) GetUserProfile() *UserProfile

func (*CreateUserProfileRequest) ProtoMessage

func (*CreateUserProfileRequest) ProtoMessage()

func (*CreateUserProfileRequest) ProtoReflect

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

func (*CreateUserProfileRequest) Reset

func (x *CreateUserProfileRequest) Reset()

func (*CreateUserProfileRequest) String

func (x *CreateUserProfileRequest) String() string

func (*CreateUserProfileRequest) Validate

func (m *CreateUserProfileRequest) Validate() error

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

type CreateUserProfileRequestValidationError

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

CreateUserProfileRequestValidationError is the validation error returned by CreateUserProfileRequest.Validate if the designated constraints aren't met.

func (CreateUserProfileRequestValidationError) Cause

Cause function returns cause value.

func (CreateUserProfileRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateUserProfileRequestValidationError) ErrorName

ErrorName returns error name.

func (CreateUserProfileRequestValidationError) Field

Field function returns field value.

func (CreateUserProfileRequestValidationError) Key

Key function returns key value.

func (CreateUserProfileRequestValidationError) Reason

Reason function returns reason value.

type DeleteUserProfileRequest

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

func (*DeleteUserProfileRequest) Descriptor deprecated

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

Deprecated: Use DeleteUserProfileRequest.ProtoReflect.Descriptor instead.

func (*DeleteUserProfileRequest) GetId

func (x *DeleteUserProfileRequest) GetId() string

func (*DeleteUserProfileRequest) ProtoMessage

func (*DeleteUserProfileRequest) ProtoMessage()

func (*DeleteUserProfileRequest) ProtoReflect

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

func (*DeleteUserProfileRequest) Reset

func (x *DeleteUserProfileRequest) Reset()

func (*DeleteUserProfileRequest) String

func (x *DeleteUserProfileRequest) String() string

func (*DeleteUserProfileRequest) Validate

func (m *DeleteUserProfileRequest) Validate() error

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

type DeleteUserProfileRequestValidationError

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

DeleteUserProfileRequestValidationError is the validation error returned by DeleteUserProfileRequest.Validate if the designated constraints aren't met.

func (DeleteUserProfileRequestValidationError) Cause

Cause function returns cause value.

func (DeleteUserProfileRequestValidationError) Error

Error satisfies the builtin error interface

func (DeleteUserProfileRequestValidationError) ErrorName

ErrorName returns error name.

func (DeleteUserProfileRequestValidationError) Field

Field function returns field value.

func (DeleteUserProfileRequestValidationError) Key

Key function returns key value.

func (DeleteUserProfileRequestValidationError) Reason

Reason function returns reason value.

type GetUserProfileBySubRequest

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

func (*GetUserProfileBySubRequest) Descriptor deprecated

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

Deprecated: Use GetUserProfileBySubRequest.ProtoReflect.Descriptor instead.

func (*GetUserProfileBySubRequest) GetSub

func (x *GetUserProfileBySubRequest) GetSub() string

func (*GetUserProfileBySubRequest) ProtoMessage

func (*GetUserProfileBySubRequest) ProtoMessage()

func (*GetUserProfileBySubRequest) ProtoReflect

func (*GetUserProfileBySubRequest) Reset

func (x *GetUserProfileBySubRequest) Reset()

func (*GetUserProfileBySubRequest) String

func (x *GetUserProfileBySubRequest) String() string

func (*GetUserProfileBySubRequest) Validate

func (m *GetUserProfileBySubRequest) Validate() error

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

type GetUserProfileBySubRequestValidationError

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

GetUserProfileBySubRequestValidationError is the validation error returned by GetUserProfileBySubRequest.Validate if the designated constraints aren't met.

func (GetUserProfileBySubRequestValidationError) Cause

Cause function returns cause value.

func (GetUserProfileBySubRequestValidationError) Error

Error satisfies the builtin error interface

func (GetUserProfileBySubRequestValidationError) ErrorName

ErrorName returns error name.

func (GetUserProfileBySubRequestValidationError) Field

Field function returns field value.

func (GetUserProfileBySubRequestValidationError) Key

Key function returns key value.

func (GetUserProfileBySubRequestValidationError) Reason

Reason function returns reason value.

type UnimplementedUserProfileInternalServer

type UnimplementedUserProfileInternalServer struct {
}

UnimplementedUserProfileInternalServer should be embedded to have forward compatible implementations.

func (UnimplementedUserProfileInternalServer) CreateUserProfile

func (UnimplementedUserProfileInternalServer) DeleteUserProfile

func (UnimplementedUserProfileInternalServer) UpdateUserProfile

type UnimplementedUserProfilesServer

type UnimplementedUserProfilesServer struct {
}

UnimplementedUserProfilesServer should be embedded to have forward compatible implementations.

func (UnimplementedUserProfilesServer) GetUserProfile

func (UnimplementedUserProfilesServer) GetUserProfileBySub

type UnsafeUserProfileInternalServer

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

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

type UnsafeUserProfilesServer

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

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

type UpdateUserProfileRequest

type UpdateUserProfileRequest struct {
	UserProfile *UserProfile `protobuf:"bytes,1,opt,name=user_profile,json=userProfile,proto3" json:"user_profile,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateUserProfileRequest) Descriptor deprecated

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

Deprecated: Use UpdateUserProfileRequest.ProtoReflect.Descriptor instead.

func (*UpdateUserProfileRequest) GetUserProfile

func (x *UpdateUserProfileRequest) GetUserProfile() *UserProfile

func (*UpdateUserProfileRequest) ProtoMessage

func (*UpdateUserProfileRequest) ProtoMessage()

func (*UpdateUserProfileRequest) ProtoReflect

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

func (*UpdateUserProfileRequest) Reset

func (x *UpdateUserProfileRequest) Reset()

func (*UpdateUserProfileRequest) String

func (x *UpdateUserProfileRequest) String() string

func (*UpdateUserProfileRequest) Validate

func (m *UpdateUserProfileRequest) Validate() error

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

type UpdateUserProfileRequestValidationError

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

UpdateUserProfileRequestValidationError is the validation error returned by UpdateUserProfileRequest.Validate if the designated constraints aren't met.

func (UpdateUserProfileRequestValidationError) Cause

Cause function returns cause value.

func (UpdateUserProfileRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateUserProfileRequestValidationError) ErrorName

ErrorName returns error name.

func (UpdateUserProfileRequestValidationError) Field

Field function returns field value.

func (UpdateUserProfileRequestValidationError) Key

Key function returns key value.

func (UpdateUserProfileRequestValidationError) Reason

Reason function returns reason value.

type UserProfile

type UserProfile struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// external unique_id provided by vcs provider
	Sub string `protobuf:"bytes,2,opt,name=sub,proto3" json:"sub,omitempty"`
	// name of the user
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// a username provided by vcs provider
	UserName string `protobuf:"bytes,4,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
	//email of user
	Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"`
	// phone of user
	PhoneNumber    string               `protobuf:"bytes,6,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	ExternalSource types.VCSProviders   `` /* 135-byte string literal not displayed */
	ProfilePicUrl  string               `protobuf:"bytes,8,opt,name=profile_pic_url,json=profilePicUrl,proto3" json:"profile_pic_url,omitempty"`
	TokenValidTill *timestamp.Timestamp `protobuf:"bytes,9,opt,name=token_valid_till,json=tokenValidTill,proto3" json:"token_valid_till,omitempty"`
	// contains filtered or unexported fields
}

func (*UserProfile) Descriptor deprecated

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

Deprecated: Use UserProfile.ProtoReflect.Descriptor instead.

func (*UserProfile) GetEmail

func (x *UserProfile) GetEmail() string

func (*UserProfile) GetExternalSource

func (x *UserProfile) GetExternalSource() types.VCSProviders

func (*UserProfile) GetId

func (x *UserProfile) GetId() string

func (*UserProfile) GetName

func (x *UserProfile) GetName() string

func (*UserProfile) GetPhoneNumber

func (x *UserProfile) GetPhoneNumber() string

func (*UserProfile) GetProfilePicUrl

func (x *UserProfile) GetProfilePicUrl() string

func (*UserProfile) GetSub

func (x *UserProfile) GetSub() string

func (*UserProfile) GetTokenValidTill

func (x *UserProfile) GetTokenValidTill() *timestamp.Timestamp

func (*UserProfile) GetUserName

func (x *UserProfile) GetUserName() string

func (*UserProfile) ProtoMessage

func (*UserProfile) ProtoMessage()

func (*UserProfile) ProtoReflect

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

func (*UserProfile) Reset

func (x *UserProfile) Reset()

func (*UserProfile) String

func (x *UserProfile) String() string

func (*UserProfile) Validate

func (m *UserProfile) Validate() error

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

type UserProfileInternalClient

type UserProfileInternalClient interface {
	//CreateUserProfile creates a user profile by external oAuth
	CreateUserProfile(ctx context.Context, in *CreateUserProfileRequest, opts ...grpc.CallOption) (*UserProfile, error)
	// CreateUserProfile will update userprofile
	UpdateUserProfile(ctx context.Context, in *UpdateUserProfileRequest, opts ...grpc.CallOption) (*UserProfile, error)
	// DeleteUserProfile delete the user
	DeleteUserProfile(ctx context.Context, in *DeleteUserProfileRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

UserProfileInternalClient is the client API for UserProfileInternal 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 UserProfileInternalServer

type UserProfileInternalServer interface {
	//CreateUserProfile creates a user profile by external oAuth
	CreateUserProfile(context.Context, *CreateUserProfileRequest) (*UserProfile, error)
	// CreateUserProfile will update userprofile
	UpdateUserProfile(context.Context, *UpdateUserProfileRequest) (*UserProfile, error)
	// DeleteUserProfile delete the user
	DeleteUserProfile(context.Context, *DeleteUserProfileRequest) (*empty.Empty, error)
}

UserProfileInternalServer is the server API for UserProfileInternal service. All implementations should embed UnimplementedUserProfileInternalServer for forward compatibility

type UserProfileValidationError

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

UserProfileValidationError is the validation error returned by UserProfile.Validate if the designated constraints aren't met.

func (UserProfileValidationError) Cause

Cause function returns cause value.

func (UserProfileValidationError) Error

Error satisfies the builtin error interface

func (UserProfileValidationError) ErrorName

func (e UserProfileValidationError) ErrorName() string

ErrorName returns error name.

func (UserProfileValidationError) Field

Field function returns field value.

func (UserProfileValidationError) Key

Key function returns key value.

func (UserProfileValidationError) Reason

Reason function returns reason value.

type UserProfilesClient

type UserProfilesClient interface {
	// GetUserProfile return a profile of a user
	GetUserProfile(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*UserProfile, error)
	//GetUserProfileBySub return a user profile by its unique sub provided by vcs
	GetUserProfileBySub(ctx context.Context, in *GetUserProfileBySubRequest, opts ...grpc.CallOption) (*UserProfile, error)
}

UserProfilesClient is the client API for UserProfiles 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 UserProfilesServer

type UserProfilesServer interface {
	// GetUserProfile return a profile of a user
	GetUserProfile(context.Context, *empty.Empty) (*UserProfile, error)
	//GetUserProfileBySub return a user profile by its unique sub provided by vcs
	GetUserProfileBySub(context.Context, *GetUserProfileBySubRequest) (*UserProfile, error)
}

UserProfilesServer is the server API for UserProfiles service. All implementations should embed UnimplementedUserProfilesServer for forward compatibility

Jump to

Keyboard shortcuts

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