//go:build stub
// +build stub

package website

import (
	"google.golang.org/grpc"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"
)

type Event struct {
	Type string `json:"type"`
	Msg  []byte `json:"msg"`
}

type Response struct {
	Type string `json:"type"`
	Err  bool   `json:"err"`
	Msg  []byte `json:"msg"`
}

func (r *Response) GetType() string {
	return r.Type
}

func (r *Response) GetErr() bool {
	return r.Err
}

func (r *Response) GetMsg() []byte {
	return r.Msg
}

type Website_SubscribeServer interface {
	Send(*Event) error
	Recv() (*Response, error)
	grpc.ServerStream
}

type UnimplementedWebsiteServer struct{}

func (UnimplementedWebsiteServer) Subscribe(stream Website_SubscribeServer) error {
	return status.Errorf(codes.Unimplemented, "method Subscribe not implemented")
}

func RegisterWebsiteServer(s grpc.ServiceRegistrar, srv WebsiteServer) {
	s.RegisterService(&_Website_ServiceDesc, srv)
}

type WebsiteServer interface {
	Subscribe(Website_SubscribeServer) error
}

var _Website_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "website.Website",
	HandlerType: (*WebsiteServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       nil,
			ServerStreams:  true,
			ClientStreams:  true,
		},
	},
	Metadata: "website.proto",
}
