facade

package
v0.0.0-...-4d51556 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 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.

View Source
var File_facade_proto protoreflect.FileDescriptor

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"`
	Time     int64  `protobuf:"varint,3,opt,name=time,proto3" json:"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) GetNickname

func (x *CommentInfo) GetNickname() string

func (*CommentInfo) GetTime

func (x *CommentInfo) GetTime() int64

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 Facade

type Facade interface {
	GetPost(ctx context.Context, req *GetPostRequest) (res *GetPostResponse, err error)
	SavePost(ctx context.Context, req *SavePostRequest) (res *SavePostResponse, 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 Facade_WatchServer) (err error)
}

type Facade_WatchServer

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

type GetCommentsRequest

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

func (*GetCommentsRequest) Descriptor deprecated

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

Deprecated: Use GetCommentsRequest.ProtoReflect.Descriptor instead.

func (*GetCommentsRequest) GetPasswd

func (x *GetCommentsRequest) GetPasswd() 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"`
	StatusMsg  string         `protobuf:"bytes,255,opt,name=status_msg,json=statusMsg,proto3" json:"status_msg,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) GetStatusMsg

func (x *GetCommentsResponse) GetStatusMsg() 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"`
	Passwd string `protobuf:"bytes,2,opt,name=passwd,proto3" json:"passwd,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) GetPasswd

func (x *GetPostRequest) GetPasswd() 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 {
	Content      string       `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	Lang         LanguageType `protobuf:"varint,2,opt,name=lang,proto3,enum=paster.facade.LanguageType" json:"lang,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"`
	Time         int64        `protobuf:"varint,5,opt,name=time,proto3" json:"time,omitempty"`
	StatusCode   int32        `protobuf:"varint,254,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	StatusMsg    string       `protobuf:"bytes,255,opt,name=status_msg,json=statusMsg,proto3" json:"status_msg,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPostResponse) Descriptor deprecated

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

Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.

func (*GetPostResponse) GetContent

func (x *GetPostResponse) GetContent() string

func (*GetPostResponse) GetIsDisposable

func (x *GetPostResponse) GetIsDisposable() bool

func (*GetPostResponse) GetLang

func (x *GetPostResponse) GetLang() LanguageType

func (*GetPostResponse) GetNickname

func (x *GetPostResponse) GetNickname() string

func (*GetPostResponse) GetStatusCode

func (x *GetPostResponse) GetStatusCode() int32

func (*GetPostResponse) GetStatusMsg

func (x *GetPostResponse) GetStatusMsg() string

func (*GetPostResponse) GetTime

func (x *GetPostResponse) GetTime() int64

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=paster.facade.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 SaveCommentRequest

type SaveCommentRequest 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"`
	PostId   int64  `protobuf:"varint,3,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	Passwd   string `protobuf:"bytes,4,opt,name=passwd,proto3" json:"passwd,omitempty"`
	// contains filtered or unexported fields
}

func (*SaveCommentRequest) Descriptor deprecated

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

Deprecated: Use SaveCommentRequest.ProtoReflect.Descriptor instead.

func (*SaveCommentRequest) GetContent

func (x *SaveCommentRequest) GetContent() string

func (*SaveCommentRequest) GetNickname

func (x *SaveCommentRequest) GetNickname() string

func (*SaveCommentRequest) GetPasswd

func (x *SaveCommentRequest) GetPasswd() 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"`
	StatusMsg  string `protobuf:"bytes,255,opt,name=status_msg,json=statusMsg,proto3" json:"status_msg,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) GetStatusMsg

func (x *SaveCommentResponse) GetStatusMsg() 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 {
	Content      string       `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	Lang         LanguageType `protobuf:"varint,2,opt,name=lang,proto3,enum=paster.facade.LanguageType" json:"lang,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"`
	Passwd       string       `protobuf:"bytes,5,opt,name=passwd,proto3" json:"passwd,omitempty"`
	// contains filtered or unexported fields
}

func (*SavePostRequest) Descriptor deprecated

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

Deprecated: Use SavePostRequest.ProtoReflect.Descriptor instead.

func (*SavePostRequest) GetContent

func (x *SavePostRequest) GetContent() string

func (*SavePostRequest) GetIsDisposable

func (x *SavePostRequest) GetIsDisposable() bool

func (*SavePostRequest) GetLang

func (x *SavePostRequest) GetLang() LanguageType

func (*SavePostRequest) GetNickname

func (x *SavePostRequest) GetNickname() string

func (*SavePostRequest) GetPasswd

func (x *SavePostRequest) GetPasswd() 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"`
	StatusMsg  string `protobuf:"bytes,255,opt,name=status_msg,json=statusMsg,proto3" json:"status_msg,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) GetStatusMsg

func (x *SavePostResponse) GetStatusMsg() 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.5.
Code generated by Kitex v0.0.5.

Jump to

Keyboard shortcuts

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