api

package
v0.0.0-...-ba8c1e6 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WorkState_name = map[int32]string{
		0: "WORK_STATE_UNSPECIFIED",
		1: "WATCHING",
		2: "WATCHED",
	}
	WorkState_value = map[string]int32{
		"WORK_STATE_UNSPECIFIED": 0,
		"WATCHING":               1,
		"WATCHED":                2,
	}
)

Enum value maps for WorkState.

Functions

func RegisterStatisticsServer

func RegisterStatisticsServer(s *grpc.Server, srv StatisticsServer)

Types

type GetDashboardRequest

type GetDashboardRequest struct {

	// Page size of works per one request.
	WorkPageSize int32 `protobuf:"varint,1,opt,name=work_page_size,json=workPageSize,proto3" json:"work_page_size,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDashboardRequest) Descriptor deprecated

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

Deprecated: Use GetDashboardRequest.ProtoReflect.Descriptor instead.

func (*GetDashboardRequest) GetWorkPageSize

func (x *GetDashboardRequest) GetWorkPageSize() int32

func (*GetDashboardRequest) ProtoMessage

func (*GetDashboardRequest) ProtoMessage()

func (*GetDashboardRequest) ProtoReflect

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

func (*GetDashboardRequest) Reset

func (x *GetDashboardRequest) Reset()

func (*GetDashboardRequest) String

func (x *GetDashboardRequest) String() string

type GetDashboardResponse

type GetDashboardResponse struct {
	Dashboard         *resource.Dashboard `protobuf:"bytes,1,opt,name=dashboard,proto3" json:"dashboard,omitempty"`
	WorkNextPageToken string              `protobuf:"bytes,2,opt,name=work_next_page_token,json=workNextPageToken,proto3" json:"work_next_page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDashboardResponse) Descriptor deprecated

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

Deprecated: Use GetDashboardResponse.ProtoReflect.Descriptor instead.

func (*GetDashboardResponse) GetDashboard

func (x *GetDashboardResponse) GetDashboard() *resource.Dashboard

func (*GetDashboardResponse) GetWorkNextPageToken

func (x *GetDashboardResponse) GetWorkNextPageToken() string

func (*GetDashboardResponse) ProtoMessage

func (*GetDashboardResponse) ProtoMessage()

func (*GetDashboardResponse) ProtoReflect

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

func (*GetDashboardResponse) Reset

func (x *GetDashboardResponse) Reset()

func (*GetDashboardResponse) String

func (x *GetDashboardResponse) String() string

type ListWorksRequest

type ListWorksRequest struct {
	State     WorkState `protobuf:"varint,1,opt,name=state,proto3,enum=api.WorkState" json:"state,omitempty"`
	PageSize  int32     `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	PageToken string    `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListWorksRequest) Descriptor deprecated

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

Deprecated: Use ListWorksRequest.ProtoReflect.Descriptor instead.

func (*ListWorksRequest) GetPageSize

func (x *ListWorksRequest) GetPageSize() int32

func (*ListWorksRequest) GetPageToken

func (x *ListWorksRequest) GetPageToken() string

func (*ListWorksRequest) GetState

func (x *ListWorksRequest) GetState() WorkState

func (*ListWorksRequest) ProtoMessage

func (*ListWorksRequest) ProtoMessage()

func (*ListWorksRequest) ProtoReflect

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

func (*ListWorksRequest) Reset

func (x *ListWorksRequest) Reset()

func (*ListWorksRequest) String

func (x *ListWorksRequest) String() string

type ListWorksResponse

type ListWorksResponse struct {
	Works         []*resource.Work `protobuf:"bytes,1,rep,name=works,proto3" json:"works,omitempty"`
	NextPageToken string           `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListWorksResponse) Descriptor deprecated

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

Deprecated: Use ListWorksResponse.ProtoReflect.Descriptor instead.

func (*ListWorksResponse) GetNextPageToken

func (x *ListWorksResponse) GetNextPageToken() string

func (*ListWorksResponse) GetWorks

func (x *ListWorksResponse) GetWorks() []*resource.Work

func (*ListWorksResponse) ProtoMessage

func (*ListWorksResponse) ProtoMessage()

func (*ListWorksResponse) ProtoReflect

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

func (*ListWorksResponse) Reset

func (x *ListWorksResponse) Reset()

func (*ListWorksResponse) String

func (x *ListWorksResponse) String() string

type StatisticsClient

type StatisticsClient interface {
	GetDashboard(ctx context.Context, in *GetDashboardRequest, opts ...grpc.CallOption) (*GetDashboardResponse, error)
	ListWorks(ctx context.Context, in *ListWorksRequest, opts ...grpc.CallOption) (*ListWorksResponse, error)
}

StatisticsClient is the client API for Statistics service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewStatisticsClient

func NewStatisticsClient(cc grpc.ClientConnInterface) StatisticsClient

type StatisticsHTTPConverter

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

StatisticsHTTPConverter has a function to convert StatisticsServer interface to http.HandlerFunc.

func NewStatisticsHTTPConverter

func NewStatisticsHTTPConverter(srv StatisticsServer) *StatisticsHTTPConverter

NewStatisticsHTTPConverter returns StatisticsHTTPConverter.

func (*StatisticsHTTPConverter) GetDashboard

func (h *StatisticsHTTPConverter) GetDashboard(cb func(ctx context.Context, w http.ResponseWriter, r *http.Request, arg, ret proto.Message, err error), interceptors ...grpc.UnaryServerInterceptor) http.HandlerFunc

GetDashboard returns StatisticsServer interface's GetDashboard converted to http.HandlerFunc.

func (*StatisticsHTTPConverter) GetDashboardWithName

func (h *StatisticsHTTPConverter) GetDashboardWithName(cb func(ctx context.Context, w http.ResponseWriter, r *http.Request, arg, ret proto.Message, err error), interceptors ...grpc.UnaryServerInterceptor) (string, string, http.HandlerFunc)

GetDashboardWithName returns Service name, Method name and StatisticsServer interface's GetDashboard converted to http.HandlerFunc.

func (*StatisticsHTTPConverter) ListWorks

func (h *StatisticsHTTPConverter) ListWorks(cb func(ctx context.Context, w http.ResponseWriter, r *http.Request, arg, ret proto.Message, err error), interceptors ...grpc.UnaryServerInterceptor) http.HandlerFunc

ListWorks returns StatisticsServer interface's ListWorks converted to http.HandlerFunc.

func (*StatisticsHTTPConverter) ListWorksWithName

func (h *StatisticsHTTPConverter) ListWorksWithName(cb func(ctx context.Context, w http.ResponseWriter, r *http.Request, arg, ret proto.Message, err error), interceptors ...grpc.UnaryServerInterceptor) (string, string, http.HandlerFunc)

ListWorksWithName returns Service name, Method name and StatisticsServer interface's ListWorks converted to http.HandlerFunc.

type StatisticsServer

type StatisticsServer interface {
	GetDashboard(context.Context, *GetDashboardRequest) (*GetDashboardResponse, error)
	ListWorks(context.Context, *ListWorksRequest) (*ListWorksResponse, error)
}

StatisticsServer is the server API for Statistics service.

type UnimplementedStatisticsServer

type UnimplementedStatisticsServer struct {
}

UnimplementedStatisticsServer can be embedded to have forward compatible implementations.

func (*UnimplementedStatisticsServer) GetDashboard

func (*UnimplementedStatisticsServer) ListWorks

type WorkState

type WorkState int32
const (
	WorkState_WORK_STATE_UNSPECIFIED WorkState = 0
	WorkState_WATCHING               WorkState = 1
	WorkState_WATCHED                WorkState = 2
)

func (WorkState) Descriptor

func (WorkState) Descriptor() protoreflect.EnumDescriptor

func (WorkState) Enum

func (x WorkState) Enum() *WorkState

func (WorkState) EnumDescriptor deprecated

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

Deprecated: Use WorkState.Descriptor instead.

func (WorkState) Number

func (x WorkState) Number() protoreflect.EnumNumber

func (WorkState) String

func (x WorkState) String() string

func (WorkState) Type

Jump to

Keyboard shortcuts

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