from .grpc_lib.blog_pb2 import (
    BlogListRequest,
    BlogRetrieveRequest,
    CategoryRetrieveRequest,
)
from .grpc_lib.blog_pb2_grpc import BlogControllerStub, CategoryControllerStub

SUCCESS_CODE = "0"


class RequestMessages:
    FETCH_ALL_BLOG = BlogListRequest
    FETCH_BLOG = BlogRetrieveRequest
    FETCH_CATEGORY = CategoryRetrieveRequest


class RPCMethodNames:
    FETCH_ONE = "Retrieve"
    FETCH_ALL = "List"


class ControllerStubs:
    BLOG = BlogControllerStub()
    CATEGORY = CategoryControllerStub()


class InvokerUnits:
    PLACETAG_SITEMAP = "placetag_sitemap"
    SEARCH = "search"
