Documentation
¶
Index ¶
- Constants
- Variables
- func InterceptorLogger() logging.Logger
- func PanicInterceptor(p any) (err error)
- func RegisterAdServiceServer(s grpc.ServiceRegistrar, srv AdServiceServer)
- type AdResponse
- func (*AdResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AdResponse) GetAuthorId() int64
- func (x *AdResponse) GetCreatedAt() *timestamppb.Timestamp
- func (x *AdResponse) GetId() int64
- func (x *AdResponse) GetPublished() bool
- func (x *AdResponse) GetText() string
- func (x *AdResponse) GetTitle() string
- func (x *AdResponse) GetUpdatedAt() *timestamppb.Timestamp
- func (*AdResponse) ProtoMessage()
- func (x *AdResponse) ProtoReflect() protoreflect.Message
- func (x *AdResponse) Reset()
- func (x *AdResponse) String() string
- type AdService
- func (a *AdService) ChangeAdStatus(ctx context.Context, request *ChangeAdStatusRequest) (*AdResponse, error)
- func (a *AdService) CreateAd(ctx context.Context, request *CreateAdRequest) (*AdResponse, error)
- func (a *AdService) CreateUser(ctx context.Context, request *CreateUserRequest) (*UserResponse, error)
- func (a *AdService) DeleteAd(ctx context.Context, request *DeleteAdRequest) (*emptypb.Empty, error)
- func (a *AdService) DeleteUser(ctx context.Context, request *DeleteUserRequest) (*emptypb.Empty, error)
- func (a *AdService) GetAd(ctx context.Context, request *GetAdRequest) (*AdResponse, error)
- func (a *AdService) GetUser(ctx context.Context, request *GetUserRequest) (*UserResponse, error)
- func (a *AdService) ListAds(ctx context.Context, request *ListAdsRequest) (*ListAdResponse, error)
- func (a *AdService) SearchAds(ctx context.Context, request *SearchAdsRequest) (*ListAdResponse, error)
- func (a *AdService) UpdateAd(ctx context.Context, request *UpdateAdRequest) (*AdResponse, error)
- func (a *AdService) UpdateUser(ctx context.Context, request *UpdateUserRequest) (*UserResponse, error)
- type AdServiceClient
- type AdServiceServer
- type ChangeAdStatusRequest
- func (*ChangeAdStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChangeAdStatusRequest) GetAdId() int64
- func (x *ChangeAdStatusRequest) GetPublished() bool
- func (x *ChangeAdStatusRequest) GetUserId() int64
- func (*ChangeAdStatusRequest) ProtoMessage()
- func (x *ChangeAdStatusRequest) ProtoReflect() protoreflect.Message
- func (x *ChangeAdStatusRequest) Reset()
- func (x *ChangeAdStatusRequest) String() string
- type CreateAdRequest
- func (*CreateAdRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateAdRequest) GetText() string
- func (x *CreateAdRequest) GetTitle() string
- func (x *CreateAdRequest) GetUserId() int64
- func (*CreateAdRequest) ProtoMessage()
- func (x *CreateAdRequest) ProtoReflect() protoreflect.Message
- func (x *CreateAdRequest) Reset()
- func (x *CreateAdRequest) String() string
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetEmail() string
- func (x *CreateUserRequest) GetName() string
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- type DeleteAdRequest
- func (*DeleteAdRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteAdRequest) GetAdId() int64
- func (x *DeleteAdRequest) GetAuthorId() int64
- func (*DeleteAdRequest) ProtoMessage()
- func (x *DeleteAdRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteAdRequest) Reset()
- func (x *DeleteAdRequest) String() string
- type DeleteUserRequest
- type GetAdRequest
- type GetUserRequest
- type ListAdResponse
- type ListAdsRequest
- func (*ListAdsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListAdsRequest) GetCreationTime() string
- func (x *ListAdsRequest) GetPublished() bool
- func (x *ListAdsRequest) GetUserId() int64
- func (*ListAdsRequest) ProtoMessage()
- func (x *ListAdsRequest) ProtoReflect() protoreflect.Message
- func (x *ListAdsRequest) Reset()
- func (x *ListAdsRequest) String() string
- type SearchAdsRequest
- type UnimplementedAdServiceServer
- func (UnimplementedAdServiceServer) ChangeAdStatus(context.Context, *ChangeAdStatusRequest) (*AdResponse, error)
- func (UnimplementedAdServiceServer) CreateAd(context.Context, *CreateAdRequest) (*AdResponse, error)
- func (UnimplementedAdServiceServer) CreateUser(context.Context, *CreateUserRequest) (*UserResponse, error)
- func (UnimplementedAdServiceServer) DeleteAd(context.Context, *DeleteAdRequest) (*emptypb.Empty, error)
- func (UnimplementedAdServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
- func (UnimplementedAdServiceServer) GetAd(context.Context, *GetAdRequest) (*AdResponse, error)
- func (UnimplementedAdServiceServer) GetUser(context.Context, *GetUserRequest) (*UserResponse, error)
- func (UnimplementedAdServiceServer) ListAds(context.Context, *ListAdsRequest) (*ListAdResponse, error)
- func (UnimplementedAdServiceServer) SearchAds(context.Context, *SearchAdsRequest) (*ListAdResponse, error)
- func (UnimplementedAdServiceServer) UpdateAd(context.Context, *UpdateAdRequest) (*AdResponse, error)
- func (UnimplementedAdServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UserResponse, error)
- type UnsafeAdServiceServer
- type UpdateAdRequest
- func (*UpdateAdRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateAdRequest) GetAdId() int64
- func (x *UpdateAdRequest) GetText() string
- func (x *UpdateAdRequest) GetTitle() string
- func (x *UpdateAdRequest) GetUserId() int64
- func (*UpdateAdRequest) ProtoMessage()
- func (x *UpdateAdRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateAdRequest) Reset()
- func (x *UpdateAdRequest) String() string
- type UpdateUserRequest
- func (*UpdateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserRequest) GetEmail() string
- func (x *UpdateUserRequest) GetId() int64
- func (x *UpdateUserRequest) GetName() string
- func (*UpdateUserRequest) ProtoMessage()
- func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserRequest) Reset()
- func (x *UpdateUserRequest) String() string
- type UserResponse
- func (*UserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserResponse) GetEmail() string
- func (x *UserResponse) GetId() int64
- func (x *UserResponse) GetName() string
- func (*UserResponse) ProtoMessage()
- func (x *UserResponse) ProtoReflect() protoreflect.Message
- func (x *UserResponse) Reset()
- func (x *UserResponse) String() string
Constants ¶
const ( AdService_CreateAd_FullMethodName = "/ad.AdService/CreateAd" AdService_ChangeAdStatus_FullMethodName = "/ad.AdService/ChangeAdStatus" AdService_UpdateAd_FullMethodName = "/ad.AdService/UpdateAd" AdService_GetAd_FullMethodName = "/ad.AdService/GetAd" AdService_DeleteAd_FullMethodName = "/ad.AdService/DeleteAd" AdService_ListAds_FullMethodName = "/ad.AdService/ListAds" AdService_SearchAds_FullMethodName = "/ad.AdService/SearchAds" AdService_CreateUser_FullMethodName = "/ad.AdService/CreateUser" AdService_UpdateUser_FullMethodName = "/ad.AdService/UpdateUser" AdService_GetUser_FullMethodName = "/ad.AdService/GetUser" AdService_DeleteUser_FullMethodName = "/ad.AdService/DeleteUser" )
Variables ¶
var AdService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ad.AdService", HandlerType: (*AdServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateAd", Handler: _AdService_CreateAd_Handler, }, { MethodName: "ChangeAdStatus", Handler: _AdService_ChangeAdStatus_Handler, }, { MethodName: "UpdateAd", Handler: _AdService_UpdateAd_Handler, }, { MethodName: "GetAd", Handler: _AdService_GetAd_Handler, }, { MethodName: "DeleteAd", Handler: _AdService_DeleteAd_Handler, }, { MethodName: "ListAds", Handler: _AdService_ListAds_Handler, }, { MethodName: "SearchAds", Handler: _AdService_SearchAds_Handler, }, { MethodName: "CreateUser", Handler: _AdService_CreateUser_Handler, }, { MethodName: "UpdateUser", Handler: _AdService_UpdateUser_Handler, }, { MethodName: "GetUser", Handler: _AdService_GetUser_Handler, }, { MethodName: "DeleteUser", Handler: _AdService_DeleteUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "lesson9/homework/internal/ports/grpc/service.proto", }
AdService_ServiceDesc is the grpc.ServiceDesc for AdService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_lesson9_homework_internal_ports_grpc_service_proto protoreflect.FileDescriptor
Functions ¶
func InterceptorLogger ¶
func PanicInterceptor ¶
func RegisterAdServiceServer ¶
func RegisterAdServiceServer(s grpc.ServiceRegistrar, srv AdServiceServer)
Types ¶
type AdResponse ¶
type AdResponse struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"` AuthorId int64 `protobuf:"varint,4,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` Published bool `protobuf:"varint,5,opt,name=published,proto3" json:"published,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func AdSuccessResponse ¶
func AdSuccessResponse(ad *ads.Ad) *AdResponse
func (*AdResponse) Descriptor
deprecated
func (*AdResponse) Descriptor() ([]byte, []int)
Deprecated: Use AdResponse.ProtoReflect.Descriptor instead.
func (*AdResponse) GetAuthorId ¶
func (x *AdResponse) GetAuthorId() int64
func (*AdResponse) GetCreatedAt ¶
func (x *AdResponse) GetCreatedAt() *timestamppb.Timestamp
func (*AdResponse) GetId ¶
func (x *AdResponse) GetId() int64
func (*AdResponse) GetPublished ¶
func (x *AdResponse) GetPublished() bool
func (*AdResponse) GetText ¶
func (x *AdResponse) GetText() string
func (*AdResponse) GetTitle ¶
func (x *AdResponse) GetTitle() string
func (*AdResponse) GetUpdatedAt ¶
func (x *AdResponse) GetUpdatedAt() *timestamppb.Timestamp
func (*AdResponse) ProtoMessage ¶
func (*AdResponse) ProtoMessage()
func (*AdResponse) ProtoReflect ¶
func (x *AdResponse) ProtoReflect() protoreflect.Message
func (*AdResponse) Reset ¶
func (x *AdResponse) Reset()
func (*AdResponse) String ¶
func (x *AdResponse) String() string
type AdService ¶
type AdService struct {
// contains filtered or unexported fields
}
func (*AdService) ChangeAdStatus ¶
func (a *AdService) ChangeAdStatus(ctx context.Context, request *ChangeAdStatusRequest) (*AdResponse, error)
func (*AdService) CreateAd ¶
func (a *AdService) CreateAd(ctx context.Context, request *CreateAdRequest) (*AdResponse, error)
func (*AdService) CreateUser ¶
func (a *AdService) CreateUser(ctx context.Context, request *CreateUserRequest) (*UserResponse, error)
func (*AdService) DeleteUser ¶
func (*AdService) GetAd ¶
func (a *AdService) GetAd(ctx context.Context, request *GetAdRequest) (*AdResponse, error)
func (*AdService) GetUser ¶
func (a *AdService) GetUser(ctx context.Context, request *GetUserRequest) (*UserResponse, error)
func (*AdService) ListAds ¶
func (a *AdService) ListAds(ctx context.Context, request *ListAdsRequest) (*ListAdResponse, error)
func (*AdService) SearchAds ¶
func (a *AdService) SearchAds(ctx context.Context, request *SearchAdsRequest) (*ListAdResponse, error)
func (*AdService) UpdateAd ¶
func (a *AdService) UpdateAd(ctx context.Context, request *UpdateAdRequest) (*AdResponse, error)
func (*AdService) UpdateUser ¶
func (a *AdService) UpdateUser(ctx context.Context, request *UpdateUserRequest) (*UserResponse, error)
type AdServiceClient ¶
type AdServiceClient interface { CreateAd(ctx context.Context, in *CreateAdRequest, opts ...grpc.CallOption) (*AdResponse, error) ChangeAdStatus(ctx context.Context, in *ChangeAdStatusRequest, opts ...grpc.CallOption) (*AdResponse, error) UpdateAd(ctx context.Context, in *UpdateAdRequest, opts ...grpc.CallOption) (*AdResponse, error) GetAd(ctx context.Context, in *GetAdRequest, opts ...grpc.CallOption) (*AdResponse, error) DeleteAd(ctx context.Context, in *DeleteAdRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) ListAds(ctx context.Context, in *ListAdsRequest, opts ...grpc.CallOption) (*ListAdResponse, error) SearchAds(ctx context.Context, in *SearchAdsRequest, opts ...grpc.CallOption) (*ListAdResponse, error) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*UserResponse, error) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UserResponse, error) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*UserResponse, error) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
AdServiceClient is the client API for AdService 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 NewAdServiceClient ¶
func NewAdServiceClient(cc grpc.ClientConnInterface) AdServiceClient
type AdServiceServer ¶
type AdServiceServer interface { CreateAd(context.Context, *CreateAdRequest) (*AdResponse, error) ChangeAdStatus(context.Context, *ChangeAdStatusRequest) (*AdResponse, error) UpdateAd(context.Context, *UpdateAdRequest) (*AdResponse, error) GetAd(context.Context, *GetAdRequest) (*AdResponse, error) DeleteAd(context.Context, *DeleteAdRequest) (*emptypb.Empty, error) ListAds(context.Context, *ListAdsRequest) (*ListAdResponse, error) SearchAds(context.Context, *SearchAdsRequest) (*ListAdResponse, error) CreateUser(context.Context, *CreateUserRequest) (*UserResponse, error) UpdateUser(context.Context, *UpdateUserRequest) (*UserResponse, error) GetUser(context.Context, *GetUserRequest) (*UserResponse, error) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error) }
AdServiceServer is the server API for AdService service. All implementations should embed UnimplementedAdServiceServer for forward compatibility
func NewService ¶
func NewService(a app.App) AdServiceServer
type ChangeAdStatusRequest ¶
type ChangeAdStatusRequest struct { AdId int64 `protobuf:"varint,1,opt,name=ad_id,json=adId,proto3" json:"ad_id,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Published bool `protobuf:"varint,3,opt,name=published,proto3" json:"published,omitempty"` // contains filtered or unexported fields }
func (*ChangeAdStatusRequest) Descriptor
deprecated
func (*ChangeAdStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChangeAdStatusRequest.ProtoReflect.Descriptor instead.
func (*ChangeAdStatusRequest) GetAdId ¶
func (x *ChangeAdStatusRequest) GetAdId() int64
func (*ChangeAdStatusRequest) GetPublished ¶
func (x *ChangeAdStatusRequest) GetPublished() bool
func (*ChangeAdStatusRequest) GetUserId ¶
func (x *ChangeAdStatusRequest) GetUserId() int64
func (*ChangeAdStatusRequest) ProtoMessage ¶
func (*ChangeAdStatusRequest) ProtoMessage()
func (*ChangeAdStatusRequest) ProtoReflect ¶
func (x *ChangeAdStatusRequest) ProtoReflect() protoreflect.Message
func (*ChangeAdStatusRequest) Reset ¶
func (x *ChangeAdStatusRequest) Reset()
func (*ChangeAdStatusRequest) String ¶
func (x *ChangeAdStatusRequest) String() string
type CreateAdRequest ¶
type CreateAdRequest struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*CreateAdRequest) Descriptor
deprecated
func (*CreateAdRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateAdRequest.ProtoReflect.Descriptor instead.
func (*CreateAdRequest) GetText ¶
func (x *CreateAdRequest) GetText() string
func (*CreateAdRequest) GetTitle ¶
func (x *CreateAdRequest) GetTitle() string
func (*CreateAdRequest) GetUserId ¶
func (x *CreateAdRequest) GetUserId() int64
func (*CreateAdRequest) ProtoMessage ¶
func (*CreateAdRequest) ProtoMessage()
func (*CreateAdRequest) ProtoReflect ¶
func (x *CreateAdRequest) ProtoReflect() protoreflect.Message
func (*CreateAdRequest) Reset ¶
func (x *CreateAdRequest) Reset()
func (*CreateAdRequest) String ¶
func (x *CreateAdRequest) String() string
type CreateUserRequest ¶
type CreateUserRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetEmail ¶
func (x *CreateUserRequest) GetEmail() string
func (*CreateUserRequest) GetName ¶
func (x *CreateUserRequest) GetName() string
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
type DeleteAdRequest ¶
type DeleteAdRequest struct { AdId int64 `protobuf:"varint,1,opt,name=ad_id,json=adId,proto3" json:"ad_id,omitempty"` AuthorId int64 `protobuf:"varint,2,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` // contains filtered or unexported fields }
func (*DeleteAdRequest) Descriptor
deprecated
func (*DeleteAdRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteAdRequest.ProtoReflect.Descriptor instead.
func (*DeleteAdRequest) GetAdId ¶
func (x *DeleteAdRequest) GetAdId() int64
func (*DeleteAdRequest) GetAuthorId ¶
func (x *DeleteAdRequest) GetAuthorId() int64
func (*DeleteAdRequest) ProtoMessage ¶
func (*DeleteAdRequest) ProtoMessage()
func (*DeleteAdRequest) ProtoReflect ¶
func (x *DeleteAdRequest) ProtoReflect() protoreflect.Message
func (*DeleteAdRequest) Reset ¶
func (x *DeleteAdRequest) Reset()
func (*DeleteAdRequest) String ¶
func (x *DeleteAdRequest) String() string
type DeleteUserRequest ¶
type DeleteUserRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteUserRequest) Descriptor
deprecated
func (*DeleteUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserRequest) GetId ¶
func (x *DeleteUserRequest) GetId() int64
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 GetAdRequest ¶
type GetAdRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetAdRequest) Descriptor
deprecated
func (*GetAdRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAdRequest.ProtoReflect.Descriptor instead.
func (*GetAdRequest) GetId ¶
func (x *GetAdRequest) GetId() int64
func (*GetAdRequest) ProtoMessage ¶
func (*GetAdRequest) ProtoMessage()
func (*GetAdRequest) ProtoReflect ¶
func (x *GetAdRequest) ProtoReflect() protoreflect.Message
func (*GetAdRequest) Reset ¶
func (x *GetAdRequest) Reset()
func (*GetAdRequest) String ¶
func (x *GetAdRequest) String() string
type GetUserRequest ¶
type GetUserRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetUserRequest) Descriptor
deprecated
func (*GetUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) GetId ¶
func (x *GetUserRequest) GetId() int64
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) ProtoReflect ¶
func (x *GetUserRequest) ProtoReflect() protoreflect.Message
func (*GetUserRequest) Reset ¶
func (x *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (x *GetUserRequest) String() string
type ListAdResponse ¶
type ListAdResponse struct { List []*AdResponse `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` // contains filtered or unexported fields }
func AdsSuccessResponse ¶
func AdsSuccessResponse(ads *[]ads.Ad) *ListAdResponse
func (*ListAdResponse) Descriptor
deprecated
func (*ListAdResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListAdResponse.ProtoReflect.Descriptor instead.
func (*ListAdResponse) GetList ¶
func (x *ListAdResponse) GetList() []*AdResponse
func (*ListAdResponse) ProtoMessage ¶
func (*ListAdResponse) ProtoMessage()
func (*ListAdResponse) ProtoReflect ¶
func (x *ListAdResponse) ProtoReflect() protoreflect.Message
func (*ListAdResponse) Reset ¶
func (x *ListAdResponse) Reset()
func (*ListAdResponse) String ¶
func (x *ListAdResponse) String() string
type ListAdsRequest ¶
type ListAdsRequest struct { Published bool `protobuf:"varint,1,opt,name=published,proto3" json:"published,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` CreationTime string `protobuf:"bytes,3,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` // contains filtered or unexported fields }
func (*ListAdsRequest) Descriptor
deprecated
func (*ListAdsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListAdsRequest.ProtoReflect.Descriptor instead.
func (*ListAdsRequest) GetCreationTime ¶
func (x *ListAdsRequest) GetCreationTime() string
func (*ListAdsRequest) GetPublished ¶
func (x *ListAdsRequest) GetPublished() bool
func (*ListAdsRequest) GetUserId ¶
func (x *ListAdsRequest) GetUserId() int64
func (*ListAdsRequest) ProtoMessage ¶
func (*ListAdsRequest) ProtoMessage()
func (*ListAdsRequest) ProtoReflect ¶
func (x *ListAdsRequest) ProtoReflect() protoreflect.Message
func (*ListAdsRequest) Reset ¶
func (x *ListAdsRequest) Reset()
func (*ListAdsRequest) String ¶
func (x *ListAdsRequest) String() string
type SearchAdsRequest ¶
type SearchAdsRequest struct { Pattern string `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"` // contains filtered or unexported fields }
func (*SearchAdsRequest) Descriptor
deprecated
func (*SearchAdsRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchAdsRequest.ProtoReflect.Descriptor instead.
func (*SearchAdsRequest) GetPattern ¶
func (x *SearchAdsRequest) GetPattern() string
func (*SearchAdsRequest) ProtoMessage ¶
func (*SearchAdsRequest) ProtoMessage()
func (*SearchAdsRequest) ProtoReflect ¶
func (x *SearchAdsRequest) ProtoReflect() protoreflect.Message
func (*SearchAdsRequest) Reset ¶
func (x *SearchAdsRequest) Reset()
func (*SearchAdsRequest) String ¶
func (x *SearchAdsRequest) String() string
type UnimplementedAdServiceServer ¶
type UnimplementedAdServiceServer struct { }
UnimplementedAdServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedAdServiceServer) ChangeAdStatus ¶
func (UnimplementedAdServiceServer) ChangeAdStatus(context.Context, *ChangeAdStatusRequest) (*AdResponse, error)
func (UnimplementedAdServiceServer) CreateAd ¶
func (UnimplementedAdServiceServer) CreateAd(context.Context, *CreateAdRequest) (*AdResponse, error)
func (UnimplementedAdServiceServer) CreateUser ¶
func (UnimplementedAdServiceServer) CreateUser(context.Context, *CreateUserRequest) (*UserResponse, error)
func (UnimplementedAdServiceServer) DeleteAd ¶
func (UnimplementedAdServiceServer) DeleteAd(context.Context, *DeleteAdRequest) (*emptypb.Empty, error)
func (UnimplementedAdServiceServer) DeleteUser ¶
func (UnimplementedAdServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
func (UnimplementedAdServiceServer) GetAd ¶
func (UnimplementedAdServiceServer) GetAd(context.Context, *GetAdRequest) (*AdResponse, error)
func (UnimplementedAdServiceServer) GetUser ¶
func (UnimplementedAdServiceServer) GetUser(context.Context, *GetUserRequest) (*UserResponse, error)
func (UnimplementedAdServiceServer) ListAds ¶
func (UnimplementedAdServiceServer) ListAds(context.Context, *ListAdsRequest) (*ListAdResponse, error)
func (UnimplementedAdServiceServer) SearchAds ¶
func (UnimplementedAdServiceServer) SearchAds(context.Context, *SearchAdsRequest) (*ListAdResponse, error)
func (UnimplementedAdServiceServer) UpdateAd ¶
func (UnimplementedAdServiceServer) UpdateAd(context.Context, *UpdateAdRequest) (*AdResponse, error)
func (UnimplementedAdServiceServer) UpdateUser ¶
func (UnimplementedAdServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UserResponse, error)
type UnsafeAdServiceServer ¶
type UnsafeAdServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAdServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AdServiceServer will result in compilation errors.
type UpdateAdRequest ¶
type UpdateAdRequest struct { AdId int64 `protobuf:"varint,1,opt,name=ad_id,json=adId,proto3" json:"ad_id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"` UserId int64 `protobuf:"varint,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*UpdateAdRequest) Descriptor
deprecated
func (*UpdateAdRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateAdRequest.ProtoReflect.Descriptor instead.
func (*UpdateAdRequest) GetAdId ¶
func (x *UpdateAdRequest) GetAdId() int64
func (*UpdateAdRequest) GetText ¶
func (x *UpdateAdRequest) GetText() string
func (*UpdateAdRequest) GetTitle ¶
func (x *UpdateAdRequest) GetTitle() string
func (*UpdateAdRequest) GetUserId ¶
func (x *UpdateAdRequest) GetUserId() int64
func (*UpdateAdRequest) ProtoMessage ¶
func (*UpdateAdRequest) ProtoMessage()
func (*UpdateAdRequest) ProtoReflect ¶
func (x *UpdateAdRequest) ProtoReflect() protoreflect.Message
func (*UpdateAdRequest) Reset ¶
func (x *UpdateAdRequest) Reset()
func (*UpdateAdRequest) String ¶
func (x *UpdateAdRequest) String() string
type UpdateUserRequest ¶
type UpdateUserRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
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) GetId ¶
func (x *UpdateUserRequest) GetId() int64
func (*UpdateUserRequest) GetName ¶
func (x *UpdateUserRequest) GetName() 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 UserResponse ¶
type UserResponse struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func UserSuccessResponse ¶
func UserSuccessResponse(user *users.User) *UserResponse
func (*UserResponse) Descriptor
deprecated
func (*UserResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.
func (*UserResponse) GetEmail ¶
func (x *UserResponse) GetEmail() string
func (*UserResponse) GetId ¶
func (x *UserResponse) GetId() int64
func (*UserResponse) GetName ¶
func (x *UserResponse) GetName() string
func (*UserResponse) ProtoMessage ¶
func (*UserResponse) ProtoMessage()
func (*UserResponse) ProtoReflect ¶
func (x *UserResponse) ProtoReflect() protoreflect.Message
func (*UserResponse) Reset ¶
func (x *UserResponse) Reset()
func (*UserResponse) String ¶
func (x *UserResponse) String() string