core

package
v0.2.1-beta Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LanguageType_name = map[int32]string{
		0: "PLAIN",
		1: "CPP",
		2: "JAVA",
		3: "PYTHON",
		4: "GO",
		5: "MD",
	}
	LanguageType_value = map[string]int32{
		"PLAIN":  0,
		"CPP":    1,
		"JAVA":   2,
		"PYTHON": 3,
		"GO":     4,
		"MD":     5,
	}
)

Enum value maps for LanguageType.

View Source
var (
	ServingStatus_name = map[int32]string{
		0: "UNKNOWN",
		1: "SERVING",
		2: "NOT_SERVING",
		3: "SERVICE_UNKNOWN",
	}
	ServingStatus_value = map[string]int32{
		"UNKNOWN":         0,
		"SERVING":         1,
		"NOT_SERVING":     2,
		"SERVICE_UNKNOWN": 3,
	}
)

Enum value maps for ServingStatus.

Functions

This section is empty.

Types

type CommentInfo

type CommentInfo struct {
	Content    string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	Nickname   string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"`
	CreateTime int64  `protobuf:"varint,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// contains filtered or unexported fields
}

func (*CommentInfo) Descriptor deprecated

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

Deprecated: Use CommentInfo.ProtoReflect.Descriptor instead.

func (*CommentInfo) GetContent

func (x *CommentInfo) GetContent() string

func (*CommentInfo) GetCreateTime

func (x *CommentInfo) GetCreateTime() int64

func (*CommentInfo) GetNickname

func (x *CommentInfo) GetNickname() string

func (*CommentInfo) ProtoMessage

func (*CommentInfo) ProtoMessage()

func (*CommentInfo) ProtoReflect

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

func (*CommentInfo) Reset

func (x *CommentInfo) Reset()

func (*CommentInfo) String

func (x *CommentInfo) String() string

type DeletePostRequest

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

func (*DeletePostRequest) Descriptor deprecated

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

Deprecated: Use DeletePostRequest.ProtoReflect.Descriptor instead.

func (*DeletePostRequest) GetId

func (x *DeletePostRequest) GetId() int64

func (*DeletePostRequest) ProtoMessage

func (*DeletePostRequest) ProtoMessage()

func (*DeletePostRequest) ProtoReflect

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

func (*DeletePostRequest) Reset

func (x *DeletePostRequest) Reset()

func (*DeletePostRequest) String

func (x *DeletePostRequest) String() string

type DeletePostResponse

type DeletePostResponse struct {
	StatusCode    int32  `protobuf:"varint,254,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	StatusMessage string `protobuf:"bytes,255,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"`
	// contains filtered or unexported fields
}

func (*DeletePostResponse) Descriptor deprecated

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

Deprecated: Use DeletePostResponse.ProtoReflect.Descriptor instead.

func (*DeletePostResponse) GetStatusCode

func (x *DeletePostResponse) GetStatusCode() int32

func (*DeletePostResponse) GetStatusMessage

func (x *DeletePostResponse) GetStatusMessage() string

func (*DeletePostResponse) ProtoMessage

func (*DeletePostResponse) ProtoMessage()

func (*DeletePostResponse) ProtoReflect

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

func (*DeletePostResponse) Reset

func (x *DeletePostResponse) Reset()

func (*DeletePostResponse) String

func (x *DeletePostResponse) String() string

type GetCommentsRequest

type GetCommentsRequest struct {
	PostId   int64  `protobuf:"varint,1,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCommentsRequest) Descriptor deprecated

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

Deprecated: Use GetCommentsRequest.ProtoReflect.Descriptor instead.

func (*GetCommentsRequest) GetPassword

func (x *GetCommentsRequest) GetPassword() string

func (*GetCommentsRequest) GetPostId

func (x *GetCommentsRequest) GetPostId() int64

func (*GetCommentsRequest) ProtoMessage

func (*GetCommentsRequest) ProtoMessage()

func (*GetCommentsRequest) ProtoReflect

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

func (*GetCommentsRequest) Reset

func (x *GetCommentsRequest) Reset()

func (*GetCommentsRequest) String

func (x *GetCommentsRequest) String() string

type GetCommentsResponse

type GetCommentsResponse struct {
	Info          []*CommentInfo `protobuf:"bytes,1,rep,name=info,proto3" json:"info,omitempty"`
	StatusCode    int32          `protobuf:"varint,254,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	StatusMessage string         `protobuf:"bytes,255,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCommentsResponse) Descriptor deprecated

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

Deprecated: Use GetCommentsResponse.ProtoReflect.Descriptor instead.

func (*GetCommentsResponse) GetInfo

func (x *GetCommentsResponse) GetInfo() []*CommentInfo

func (*GetCommentsResponse) GetStatusCode

func (x *GetCommentsResponse) GetStatusCode() int32

func (*GetCommentsResponse) GetStatusMessage

func (x *GetCommentsResponse) GetStatusMessage() string

func (*GetCommentsResponse) ProtoMessage

func (*GetCommentsResponse) ProtoMessage()

func (*GetCommentsResponse) ProtoReflect

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

func (*GetCommentsResponse) Reset

func (x *GetCommentsResponse) Reset()

func (*GetCommentsResponse) String

func (x *GetCommentsResponse) String() string

type GetPostRequest

type GetPostRequest struct {
	Id       int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPostRequest) Descriptor deprecated

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

Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.

func (*GetPostRequest) GetId

func (x *GetPostRequest) GetId() int64

func (*GetPostRequest) GetPassword

func (x *GetPostRequest) GetPassword() string

func (*GetPostRequest) ProtoMessage

func (*GetPostRequest) ProtoMessage()

func (*GetPostRequest) ProtoReflect

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

func (*GetPostRequest) Reset

func (x *GetPostRequest) Reset()

func (*GetPostRequest) String

func (x *GetPostRequest) String() string

type GetPostResponse

type GetPostResponse struct {
	Info          *PostInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	StatusCode    int32     `protobuf:"varint,254,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	StatusMessage string    `protobuf:"bytes,255,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPostResponse) Descriptor deprecated

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

Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.

func (*GetPostResponse) GetInfo

func (x *GetPostResponse) GetInfo() *PostInfo

func (*GetPostResponse) GetStatusCode

func (x *GetPostResponse) GetStatusCode() int32

func (*GetPostResponse) GetStatusMessage

func (x *GetPostResponse) GetStatusMessage() string

func (*GetPostResponse) ProtoMessage

func (*GetPostResponse) ProtoMessage()

func (*GetPostResponse) ProtoReflect

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

func (*GetPostResponse) Reset

func (x *GetPostResponse) Reset()

func (*GetPostResponse) String

func (x *GetPostResponse) String() string

type HealthCheckRequest

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

func (*HealthCheckRequest) Descriptor deprecated

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

Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.

func (*HealthCheckRequest) GetService

func (x *HealthCheckRequest) GetService() string

func (*HealthCheckRequest) ProtoMessage

func (*HealthCheckRequest) ProtoMessage()

func (*HealthCheckRequest) ProtoReflect

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

func (*HealthCheckRequest) Reset

func (x *HealthCheckRequest) Reset()

func (*HealthCheckRequest) String

func (x *HealthCheckRequest) String() string

type HealthCheckResponse

type HealthCheckResponse struct {
	Status ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=core.ServingStatus" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthCheckResponse) Descriptor deprecated

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

Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.

func (*HealthCheckResponse) GetStatus

func (x *HealthCheckResponse) GetStatus() ServingStatus

func (*HealthCheckResponse) ProtoMessage

func (*HealthCheckResponse) ProtoMessage()

func (*HealthCheckResponse) ProtoReflect

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

func (*HealthCheckResponse) Reset

func (x *HealthCheckResponse) Reset()

func (*HealthCheckResponse) String

func (x *HealthCheckResponse) String() string

type LanguageType

type LanguageType int32
const (
	LanguageType_PLAIN  LanguageType = 0
	LanguageType_CPP    LanguageType = 1
	LanguageType_JAVA   LanguageType = 2
	LanguageType_PYTHON LanguageType = 3
	LanguageType_GO     LanguageType = 4
	LanguageType_MD     LanguageType = 5
)

func (LanguageType) Descriptor

func (LanguageType) Enum

func (x LanguageType) Enum() *LanguageType

func (LanguageType) EnumDescriptor deprecated

func (LanguageType) EnumDescriptor() ([]byte, []int)

Deprecated: Use LanguageType.Descriptor instead.

func (LanguageType) Number

func (LanguageType) String

func (x LanguageType) String() string

func (LanguageType) Type

type PasterCore

type PasterCore interface {
	GetPost(ctx context.Context, req *GetPostRequest) (res *GetPostResponse, err error)
	SavePost(ctx context.Context, req *SavePostRequest) (res *SavePostResponse, err error)
	DeletePost(ctx context.Context, req *DeletePostRequest) (res *DeletePostResponse, err error)
	GetComments(ctx context.Context, req *GetCommentsRequest) (res *GetCommentsResponse, err error)
	SaveComment(ctx context.Context, req *SaveCommentRequest) (res *SaveCommentResponse, err error)
	Check(ctx context.Context, req *HealthCheckRequest) (res *HealthCheckResponse, err error)
	Watch(req *HealthCheckRequest, stream PasterCore_WatchServer) (err error)
}

type PasterCore_WatchServer

type PasterCore_WatchServer interface {
	streaming.Stream
	Send(*HealthCheckResponse) error
}

type PostInfo

type PostInfo struct {
	Content      string       `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	Language     LanguageType `protobuf:"varint,2,opt,name=language,proto3,enum=core.LanguageType" json:"language,omitempty"`
	Nickname     string       `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname,omitempty"`
	IsDisposable bool         `protobuf:"varint,4,opt,name=is_disposable,json=isDisposable,proto3" json:"is_disposable,omitempty"`
	CreateTime   int64        `protobuf:"varint,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// contains filtered or unexported fields
}

func (*PostInfo) Descriptor deprecated

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

Deprecated: Use PostInfo.ProtoReflect.Descriptor instead.

func (*PostInfo) GetContent

func (x *PostInfo) GetContent() string

func (*PostInfo) GetCreateTime

func (x *PostInfo) GetCreateTime() int64

func (*PostInfo) GetIsDisposable

func (x *PostInfo) GetIsDisposable() bool

func (*PostInfo) GetLanguage

func (x *PostInfo) GetLanguage() LanguageType

func (*PostInfo) GetNickname

func (x *PostInfo) GetNickname() string

func (*PostInfo) ProtoMessage

func (*PostInfo) ProtoMessage()

func (*PostInfo) ProtoReflect

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

func (*PostInfo) Reset

func (x *PostInfo) Reset()

func (*PostInfo) String

func (x *PostInfo) String() string

type SaveCommentRequest

type SaveCommentRequest struct {
	Info     *CommentInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	PostId   int64        `protobuf:"varint,2,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	Password string       `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*SaveCommentRequest) Descriptor deprecated

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

Deprecated: Use SaveCommentRequest.ProtoReflect.Descriptor instead.

func (*SaveCommentRequest) GetInfo

func (x *SaveCommentRequest) GetInfo() *CommentInfo

func (*SaveCommentRequest) GetPassword

func (x *SaveCommentRequest) GetPassword() string

func (*SaveCommentRequest) GetPostId

func (x *SaveCommentRequest) GetPostId() int64

func (*SaveCommentRequest) ProtoMessage

func (*SaveCommentRequest) ProtoMessage()

func (*SaveCommentRequest) ProtoReflect

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

func (*SaveCommentRequest) Reset

func (x *SaveCommentRequest) Reset()

func (*SaveCommentRequest) String

func (x *SaveCommentRequest) String() string

type SaveCommentResponse

type SaveCommentResponse struct {
	StatusCode    int32  `protobuf:"varint,254,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	StatusMessage string `protobuf:"bytes,255,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"`
	// contains filtered or unexported fields
}

func (*SaveCommentResponse) Descriptor deprecated

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

Deprecated: Use SaveCommentResponse.ProtoReflect.Descriptor instead.

func (*SaveCommentResponse) GetStatusCode

func (x *SaveCommentResponse) GetStatusCode() int32

func (*SaveCommentResponse) GetStatusMessage

func (x *SaveCommentResponse) GetStatusMessage() string

func (*SaveCommentResponse) ProtoMessage

func (*SaveCommentResponse) ProtoMessage()

func (*SaveCommentResponse) ProtoReflect

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

func (*SaveCommentResponse) Reset

func (x *SaveCommentResponse) Reset()

func (*SaveCommentResponse) String

func (x *SaveCommentResponse) String() string

type SavePostRequest

type SavePostRequest struct {
	Info     *PostInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	Password string    `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*SavePostRequest) Descriptor deprecated

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

Deprecated: Use SavePostRequest.ProtoReflect.Descriptor instead.

func (*SavePostRequest) GetInfo

func (x *SavePostRequest) GetInfo() *PostInfo

func (*SavePostRequest) GetPassword

func (x *SavePostRequest) GetPassword() string

func (*SavePostRequest) ProtoMessage

func (*SavePostRequest) ProtoMessage()

func (*SavePostRequest) ProtoReflect

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

func (*SavePostRequest) Reset

func (x *SavePostRequest) Reset()

func (*SavePostRequest) String

func (x *SavePostRequest) String() string

type SavePostResponse

type SavePostResponse struct {
	Id            int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	StatusCode    int32  `protobuf:"varint,254,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	StatusMessage string `protobuf:"bytes,255,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"`
	// contains filtered or unexported fields
}

func (*SavePostResponse) Descriptor deprecated

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

Deprecated: Use SavePostResponse.ProtoReflect.Descriptor instead.

func (*SavePostResponse) GetId

func (x *SavePostResponse) GetId() int64

func (*SavePostResponse) GetStatusCode

func (x *SavePostResponse) GetStatusCode() int32

func (*SavePostResponse) GetStatusMessage

func (x *SavePostResponse) GetStatusMessage() string

func (*SavePostResponse) ProtoMessage

func (*SavePostResponse) ProtoMessage()

func (*SavePostResponse) ProtoReflect

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

func (*SavePostResponse) Reset

func (x *SavePostResponse) Reset()

func (*SavePostResponse) String

func (x *SavePostResponse) String() string

type ServingStatus

type ServingStatus int32
const (
	ServingStatus_UNKNOWN         ServingStatus = 0
	ServingStatus_SERVING         ServingStatus = 1
	ServingStatus_NOT_SERVING     ServingStatus = 2
	ServingStatus_SERVICE_UNKNOWN ServingStatus = 3
)

func (ServingStatus) Descriptor

func (ServingStatus) Enum

func (x ServingStatus) Enum() *ServingStatus

func (ServingStatus) EnumDescriptor deprecated

func (ServingStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use ServingStatus.Descriptor instead.

func (ServingStatus) Number

func (ServingStatus) String

func (x ServingStatus) String() string

func (ServingStatus) Type

Directories

Path Synopsis
Code generated by Kitex v0.0.3.
Code generated by Kitex v0.0.3.

Jump to

Keyboard shortcuts

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