go_micro_service_tag

package
v0.0.0-...-3aa4068 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_micro_examples_blog_tag_proto_tag_tag_proto protoreflect.FileDescriptor

Functions

func NewTagServiceEndpoints

func NewTagServiceEndpoints() []*api.Endpoint

func RegisterTagServiceHandler

func RegisterTagServiceHandler(s server.Server, hdlr TagServiceHandler, opts ...server.HandlerOption) error

Types

type DecreaseCountRequest

type DecreaseCountRequest struct {
	ParentID string `protobuf:"bytes,1,opt,name=parentID,proto3" json:"parentID,omitempty"`
	Type     string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Title    string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
	// contains filtered or unexported fields
}

func (*DecreaseCountRequest) Descriptor deprecated

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

Deprecated: Use DecreaseCountRequest.ProtoReflect.Descriptor instead.

func (*DecreaseCountRequest) GetParentID

func (x *DecreaseCountRequest) GetParentID() string

func (*DecreaseCountRequest) GetTitle

func (x *DecreaseCountRequest) GetTitle() string

func (*DecreaseCountRequest) GetType

func (x *DecreaseCountRequest) GetType() string

func (*DecreaseCountRequest) ProtoMessage

func (*DecreaseCountRequest) ProtoMessage()

func (*DecreaseCountRequest) ProtoReflect

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

func (*DecreaseCountRequest) Reset

func (x *DecreaseCountRequest) Reset()

func (*DecreaseCountRequest) String

func (x *DecreaseCountRequest) String() string

type DecreaseCountResponse

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

func (*DecreaseCountResponse) Descriptor deprecated

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

Deprecated: Use DecreaseCountResponse.ProtoReflect.Descriptor instead.

func (*DecreaseCountResponse) ProtoMessage

func (*DecreaseCountResponse) ProtoMessage()

func (*DecreaseCountResponse) ProtoReflect

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

func (*DecreaseCountResponse) Reset

func (x *DecreaseCountResponse) Reset()

func (*DecreaseCountResponse) String

func (x *DecreaseCountResponse) String() string

type IncreaseCountRequest

type IncreaseCountRequest struct {
	ParentID string `protobuf:"bytes,1,opt,name=parentID,proto3" json:"parentID,omitempty"`
	Type     string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Title    string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
	// contains filtered or unexported fields
}

func (*IncreaseCountRequest) Descriptor deprecated

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

Deprecated: Use IncreaseCountRequest.ProtoReflect.Descriptor instead.

func (*IncreaseCountRequest) GetParentID

func (x *IncreaseCountRequest) GetParentID() string

func (*IncreaseCountRequest) GetTitle

func (x *IncreaseCountRequest) GetTitle() string

func (*IncreaseCountRequest) GetType

func (x *IncreaseCountRequest) GetType() string

func (*IncreaseCountRequest) ProtoMessage

func (*IncreaseCountRequest) ProtoMessage()

func (*IncreaseCountRequest) ProtoReflect

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

func (*IncreaseCountRequest) Reset

func (x *IncreaseCountRequest) Reset()

func (*IncreaseCountRequest) String

func (x *IncreaseCountRequest) String() string

type IncreaseCountResponse

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

func (*IncreaseCountResponse) Descriptor deprecated

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

Deprecated: Use IncreaseCountResponse.ProtoReflect.Descriptor instead.

func (*IncreaseCountResponse) ProtoMessage

func (*IncreaseCountResponse) ProtoMessage()

func (*IncreaseCountResponse) ProtoReflect

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

func (*IncreaseCountResponse) Reset

func (x *IncreaseCountResponse) Reset()

func (*IncreaseCountResponse) String

func (x *IncreaseCountResponse) String() string

type ListRequest

type ListRequest struct {
	ParentID string `protobuf:"bytes,1,opt,name=parentID,proto3" json:"parentID,omitempty"`
	Type     string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	MinCount int64  `protobuf:"varint,3,opt,name=minCount,proto3" json:"minCount,omitempty"`
	MaxCount int64  `protobuf:"varint,4,opt,name=maxCount,proto3" json:"maxCount,omitempty"`
	// contains filtered or unexported fields
}

ListRequest: list either by parent id or type. Optionally filter by min or max count.

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetMaxCount

func (x *ListRequest) GetMaxCount() int64

func (*ListRequest) GetMinCount

func (x *ListRequest) GetMinCount() int64

func (*ListRequest) GetParentID

func (x *ListRequest) GetParentID() string

func (*ListRequest) GetType

func (x *ListRequest) GetType() string

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

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

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {
	Tags []*Tag `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetTags

func (x *ListResponse) GetTags() []*Tag

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

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

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type Tag

type Tag struct {

	// The id of the parent object
	ParentID string `protobuf:"bytes,1,opt,name=parentID,proto3" json:"parentID,omitempty"`
	// Type is useful for namespacing and listing across parents,
	// ie. list tags for posts, customers etc.
	Type  string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Slug  string `protobuf:"bytes,3,opt,name=slug,proto3" json:"slug,omitempty"`
	Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
	Count int64  `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*Tag) Descriptor deprecated

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

Deprecated: Use Tag.ProtoReflect.Descriptor instead.

func (*Tag) GetCount

func (x *Tag) GetCount() int64

func (*Tag) GetParentID

func (x *Tag) GetParentID() string

func (*Tag) GetSlug

func (x *Tag) GetSlug() string

func (*Tag) GetTitle

func (x *Tag) GetTitle() string

func (*Tag) GetType

func (x *Tag) GetType() string

func (*Tag) ProtoMessage

func (*Tag) ProtoMessage()

func (*Tag) ProtoReflect

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

func (*Tag) Reset

func (x *Tag) Reset()

func (*Tag) String

func (x *Tag) String() string

type TagService

type TagService interface {
	// Increase count creates the tag or bumps the counter
	IncreaseCount(ctx context.Context, in *IncreaseCountRequest, opts ...client.CallOption) (*IncreaseCountResponse, error)
	// Decreases the counter
	DecreaseCount(ctx context.Context, in *DecreaseCountRequest, opts ...client.CallOption) (*DecreaseCountResponse, error)
	List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (*ListResponse, error)
	// Change properties of a tag, currently only the title
	Update(ctx context.Context, in *UpdateRequest, opts ...client.CallOption) (*UpdateResponse, error)
}

func NewTagService

func NewTagService(name string, c client.Client) TagService

type TagServiceHandler

type TagServiceHandler interface {
	// Increase count creates the tag or bumps the counter
	IncreaseCount(context.Context, *IncreaseCountRequest, *IncreaseCountResponse) error
	// Decreases the counter
	DecreaseCount(context.Context, *DecreaseCountRequest, *DecreaseCountResponse) error
	List(context.Context, *ListRequest, *ListResponse) error
	// Change properties of a tag, currently only the title
	Update(context.Context, *UpdateRequest, *UpdateResponse) error
}

type UpdateRequest

type UpdateRequest struct {
	ParentID string `protobuf:"bytes,1,opt,name=parentID,proto3" json:"parentID,omitempty"`
	Type     string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Title    string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRequest) Descriptor deprecated

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

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetParentID

func (x *UpdateRequest) GetParentID() string

func (*UpdateRequest) GetTitle

func (x *UpdateRequest) GetTitle() string

func (*UpdateRequest) GetType

func (x *UpdateRequest) GetType() string

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect

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

func (*UpdateRequest) Reset

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String

func (x *UpdateRequest) String() string

type UpdateResponse

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

func (*UpdateResponse) Descriptor deprecated

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

Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.

func (*UpdateResponse) ProtoMessage

func (*UpdateResponse) ProtoMessage()

func (*UpdateResponse) ProtoReflect

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

func (*UpdateResponse) Reset

func (x *UpdateResponse) Reset()

func (*UpdateResponse) String

func (x *UpdateResponse) String() string

Jump to

Keyboard shortcuts

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