api

package
v0.0.0-...-fe5af3a Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthApi        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowApi          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupApi = fmt.Errorf("proto: unexpected end of group")
)
View Source
var AlarmType_name = map[int32]string{
	1: "CouponDingTalk",
	2: "CouponQyWeChat",
}
View Source
var AlarmType_value = map[string]int32{
	"CouponDingTalk": 1,
	"CouponQyWeChat": 2,
}

Functions

func RegisterAlarmServer

func RegisterAlarmServer(s *grpc.Server, srv AlarmServer)

Types

type AlarmClient

type AlarmClient interface {
	// 通知
	DingTalk(ctx context.Context, in *NotifyReq, opts ...grpc.CallOption) (*NotifyRsp, error)
}

AlarmClient is the client API for Alarm service.

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

func NewAlarmClient

func NewAlarmClient(cc *grpc.ClientConn) AlarmClient

type AlarmServer

type AlarmServer interface {
	// 通知
	DingTalk(context.Context, *NotifyReq) (*NotifyRsp, error)
}

AlarmServer is the server API for Alarm service.

type AlarmType

type AlarmType int32

通知类型 业务+通知平台

const (
	// coupon钉钉通知
	AlarmType_CouponDingTalk AlarmType = 1
	// coupon企业微信通知
	AlarmType_CouponQyWeChat AlarmType = 2
)

func (AlarmType) Enum

func (x AlarmType) Enum() *AlarmType

func (AlarmType) EnumDescriptor

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

func (AlarmType) String

func (x AlarmType) String() string

func (*AlarmType) UnmarshalJSON

func (x *AlarmType) UnmarshalJSON(data []byte) error

type NotifyReq

type NotifyReq struct {
	// 类型
	AlarmType *AlarmType `protobuf:"varint,1,req,name=alarm_type,json=alarmType,enum=api.AlarmType" json:"alarm_type,omitempty"`
	// 标题
	Title *string `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"`
	// 内容
	Content              *string  `protobuf:"bytes,3,req,name=content" json:"content,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*NotifyReq) Descriptor

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

func (*NotifyReq) GetAlarmType

func (m *NotifyReq) GetAlarmType() AlarmType

func (*NotifyReq) GetContent

func (m *NotifyReq) GetContent() string

func (*NotifyReq) GetTitle

func (m *NotifyReq) GetTitle() string

func (*NotifyReq) Marshal

func (m *NotifyReq) Marshal() (dAtA []byte, err error)

func (*NotifyReq) MarshalTo

func (m *NotifyReq) MarshalTo(dAtA []byte) (int, error)

func (*NotifyReq) MarshalToSizedBuffer

func (m *NotifyReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NotifyReq) ProtoMessage

func (*NotifyReq) ProtoMessage()

func (*NotifyReq) Reset

func (m *NotifyReq) Reset()

func (*NotifyReq) Size

func (m *NotifyReq) Size() (n int)

func (*NotifyReq) String

func (m *NotifyReq) String() string

func (*NotifyReq) Unmarshal

func (m *NotifyReq) Unmarshal(dAtA []byte) error

func (*NotifyReq) XXX_DiscardUnknown

func (m *NotifyReq) XXX_DiscardUnknown()

func (*NotifyReq) XXX_Marshal

func (m *NotifyReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NotifyReq) XXX_Merge

func (m *NotifyReq) XXX_Merge(src proto.Message)

func (*NotifyReq) XXX_Size

func (m *NotifyReq) XXX_Size() int

func (*NotifyReq) XXX_Unmarshal

func (m *NotifyReq) XXX_Unmarshal(b []byte) error

type NotifyRsp

type NotifyRsp struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*NotifyRsp) Descriptor

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

func (*NotifyRsp) Marshal

func (m *NotifyRsp) Marshal() (dAtA []byte, err error)

func (*NotifyRsp) MarshalTo

func (m *NotifyRsp) MarshalTo(dAtA []byte) (int, error)

func (*NotifyRsp) MarshalToSizedBuffer

func (m *NotifyRsp) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NotifyRsp) ProtoMessage

func (*NotifyRsp) ProtoMessage()

func (*NotifyRsp) Reset

func (m *NotifyRsp) Reset()

func (*NotifyRsp) Size

func (m *NotifyRsp) Size() (n int)

func (*NotifyRsp) String

func (m *NotifyRsp) String() string

func (*NotifyRsp) Unmarshal

func (m *NotifyRsp) Unmarshal(dAtA []byte) error

func (*NotifyRsp) XXX_DiscardUnknown

func (m *NotifyRsp) XXX_DiscardUnknown()

func (*NotifyRsp) XXX_Marshal

func (m *NotifyRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NotifyRsp) XXX_Merge

func (m *NotifyRsp) XXX_Merge(src proto.Message)

func (*NotifyRsp) XXX_Size

func (m *NotifyRsp) XXX_Size() int

func (*NotifyRsp) XXX_Unmarshal

func (m *NotifyRsp) XXX_Unmarshal(b []byte) error

type UnimplementedAlarmServer

type UnimplementedAlarmServer struct {
}

UnimplementedAlarmServer can be embedded to have forward compatible implementations.

func (*UnimplementedAlarmServer) DingTalk

Jump to

Keyboard shortcuts

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