api

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package api is a generated blademaster stub package. This code was generated with go-common/app/tool/bmgen/protoc-gen-bm v0.1.

It is generated from these files:

api.proto

Package api is a generated protocol buffer package.

It is generated from these files:
	app/service/main/passport-sns/api/api.proto

It has these top-level messages:
	EmptyReply
	Info
	GetAuthorizeURLReq
	GetAuthorizeURLReply
	BindReq
	UnbindReq
	GetInfoReq
	GetInfoReply
	GetInfoByCodeReq
	GetInfoByCodeReply
	UpdateInfoReq

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")
)
View Source
var PathPassportSNSBind = "/x/internal/passport-sns/bind"
View Source
var PathPassportSNSGetAuthorizeURL = "/x/internal/passport-sns/authorize/url"
View Source
var PathPassportSNSGetInfo = "/x/internal/passport-sns/info"
View Source
var PathPassportSNSGetInfoByCode = "/x/internal/passport-sns/info/code"
View Source
var PathPassportSNSUnbind = "/x/internal/passport-sns/unbind"
View Source
var PathPassportSNSUpdateInfo = "/x/internal/passport-sns/info/update"

Functions

func RegisterPassportSNSBMServer

func RegisterPassportSNSBMServer(e *bm.Engine, server PassportSNSBMServer)

RegisterPassportSNSBMServer Register the blademaster route

func RegisterPassportSNSServer

func RegisterPassportSNSServer(s *grpc.Server, srv PassportSNSServer)

func RegisterPassportSNSService

func RegisterPassportSNSService(e *bm.Engine, svc PassportSNSBMServer, midMap map[string]bm.HandlerFunc)

RegisterPassportSNSService Register the blademaster route with middleware map midMap is the middleware map, the key is defined in proto

Types

type BindReq

type BindReq struct {
	Mid         int64  `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty" form:"mid" validate:"required"`
	Code        string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty" form:"code" validate:"required"`
	AppId       string `protobuf:"bytes,3,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty" form:"appid" validate:"required"`
	Platform    string `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty" form:"platform" validate:"required"`
	RedirectUrl string `` /* 134-byte string literal not displayed */
}

func (*BindReq) Descriptor

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

func (*BindReq) GetAppId

func (m *BindReq) GetAppId() string

func (*BindReq) GetCode

func (m *BindReq) GetCode() string

func (*BindReq) GetMid

func (m *BindReq) GetMid() int64

func (*BindReq) GetPlatform

func (m *BindReq) GetPlatform() string

func (*BindReq) GetRedirectUrl

func (m *BindReq) GetRedirectUrl() string

func (*BindReq) Marshal

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

func (*BindReq) MarshalTo

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

func (*BindReq) ProtoMessage

func (*BindReq) ProtoMessage()

func (*BindReq) Reset

func (m *BindReq) Reset()

func (*BindReq) Size

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

func (*BindReq) String

func (m *BindReq) String() string

func (*BindReq) Unmarshal

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

type EmptyReply

type EmptyReply struct {
}

func (*EmptyReply) Descriptor

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

func (*EmptyReply) Marshal

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

func (*EmptyReply) MarshalTo

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

func (*EmptyReply) ProtoMessage

func (*EmptyReply) ProtoMessage()

func (*EmptyReply) Reset

func (m *EmptyReply) Reset()

func (*EmptyReply) Size

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

func (*EmptyReply) String

func (m *EmptyReply) String() string

func (*EmptyReply) Unmarshal

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

type GetAuthorizeURLReply

type GetAuthorizeURLReply struct {
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"`
}

func (*GetAuthorizeURLReply) Descriptor

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

func (*GetAuthorizeURLReply) GetUrl

func (m *GetAuthorizeURLReply) GetUrl() string

func (*GetAuthorizeURLReply) Marshal

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

func (*GetAuthorizeURLReply) MarshalTo

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

func (*GetAuthorizeURLReply) ProtoMessage

func (*GetAuthorizeURLReply) ProtoMessage()

func (*GetAuthorizeURLReply) Reset

func (m *GetAuthorizeURLReply) Reset()

func (*GetAuthorizeURLReply) Size

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

func (*GetAuthorizeURLReply) String

func (m *GetAuthorizeURLReply) String() string

func (*GetAuthorizeURLReply) Unmarshal

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

type GetAuthorizeURLReq

type GetAuthorizeURLReq struct {
	AppId       string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty" form:"appid" validate:"required"`
	Platform    string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform,omitempty" form:"platform" validate:"required"`
	RedirectUrl string `` /* 134-byte string literal not displayed */
	Display     string `protobuf:"bytes,4,opt,name=display,proto3" json:"display,omitempty" form:"display"`
}

func (*GetAuthorizeURLReq) Descriptor

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

func (*GetAuthorizeURLReq) GetAppId

func (m *GetAuthorizeURLReq) GetAppId() string

func (*GetAuthorizeURLReq) GetDisplay

func (m *GetAuthorizeURLReq) GetDisplay() string

func (*GetAuthorizeURLReq) GetPlatform

func (m *GetAuthorizeURLReq) GetPlatform() string

func (*GetAuthorizeURLReq) GetRedirectUrl

func (m *GetAuthorizeURLReq) GetRedirectUrl() string

func (*GetAuthorizeURLReq) Marshal

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

func (*GetAuthorizeURLReq) MarshalTo

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

func (*GetAuthorizeURLReq) ProtoMessage

func (*GetAuthorizeURLReq) ProtoMessage()

func (*GetAuthorizeURLReq) Reset

func (m *GetAuthorizeURLReq) Reset()

func (*GetAuthorizeURLReq) Size

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

func (*GetAuthorizeURLReq) String

func (m *GetAuthorizeURLReq) String() string

func (*GetAuthorizeURLReq) Unmarshal

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

type GetInfoByCodeReply

type GetInfoByCodeReply struct {
	Mid     int64  `protobuf:"varint,1,opt,name=mid,proto3" json:"mid"`
	UnionId string `protobuf:"bytes,2,opt,name=union_id,json=unionId,proto3" json:"unionid"`
	OpenId  string `protobuf:"bytes,3,opt,name=open_id,json=openId,proto3" json:"openid"`
	Expires int64  `protobuf:"varint,4,opt,name=expires,proto3" json:"expires"`
	Token   string `protobuf:"bytes,5,opt,name=token,proto3" json:"token"`
}

func (*GetInfoByCodeReply) Descriptor

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

func (*GetInfoByCodeReply) GetExpires

func (m *GetInfoByCodeReply) GetExpires() int64

func (*GetInfoByCodeReply) GetMid

func (m *GetInfoByCodeReply) GetMid() int64

func (*GetInfoByCodeReply) GetOpenId

func (m *GetInfoByCodeReply) GetOpenId() string

func (*GetInfoByCodeReply) GetToken

func (m *GetInfoByCodeReply) GetToken() string

func (*GetInfoByCodeReply) GetUnionId

func (m *GetInfoByCodeReply) GetUnionId() string

func (*GetInfoByCodeReply) Marshal

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

func (*GetInfoByCodeReply) MarshalTo

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

func (*GetInfoByCodeReply) ProtoMessage

func (*GetInfoByCodeReply) ProtoMessage()

func (*GetInfoByCodeReply) Reset

func (m *GetInfoByCodeReply) Reset()

func (*GetInfoByCodeReply) Size

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

func (*GetInfoByCodeReply) String

func (m *GetInfoByCodeReply) String() string

func (*GetInfoByCodeReply) Unmarshal

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

type GetInfoByCodeReq

type GetInfoByCodeReq struct {
	Code        string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty" form:"code" validate:"required"`
	AppId       string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty" form:"appid" validate:"required"`
	Platform    string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty" form:"platform" validate:"required"`
	RedirectUrl string `` /* 134-byte string literal not displayed */
}

func (*GetInfoByCodeReq) Descriptor

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

func (*GetInfoByCodeReq) GetAppId

func (m *GetInfoByCodeReq) GetAppId() string

func (*GetInfoByCodeReq) GetCode

func (m *GetInfoByCodeReq) GetCode() string

func (*GetInfoByCodeReq) GetPlatform

func (m *GetInfoByCodeReq) GetPlatform() string

func (*GetInfoByCodeReq) GetRedirectUrl

func (m *GetInfoByCodeReq) GetRedirectUrl() string

func (*GetInfoByCodeReq) Marshal

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

func (*GetInfoByCodeReq) MarshalTo

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

func (*GetInfoByCodeReq) ProtoMessage

func (*GetInfoByCodeReq) ProtoMessage()

func (*GetInfoByCodeReq) Reset

func (m *GetInfoByCodeReq) Reset()

func (*GetInfoByCodeReq) Size

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

func (*GetInfoByCodeReq) String

func (m *GetInfoByCodeReq) String() string

func (*GetInfoByCodeReq) Unmarshal

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

type GetInfoReply

type GetInfoReply struct {
	Infos []*Info `protobuf:"bytes,1,rep,name=infos" json:"infos"`
}

func (*GetInfoReply) Descriptor

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

func (*GetInfoReply) GetInfos

func (m *GetInfoReply) GetInfos() []*Info

func (*GetInfoReply) Marshal

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

func (*GetInfoReply) MarshalTo

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

func (*GetInfoReply) ProtoMessage

func (*GetInfoReply) ProtoMessage()

func (*GetInfoReply) Reset

func (m *GetInfoReply) Reset()

func (*GetInfoReply) Size

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

func (*GetInfoReply) String

func (m *GetInfoReply) String() string

func (*GetInfoReply) Unmarshal

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

type GetInfoReq

type GetInfoReq struct {
	Mid int64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty" form:"mid" validate:"required"`
}

func (*GetInfoReq) Descriptor

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

func (*GetInfoReq) GetMid

func (m *GetInfoReq) GetMid() int64

func (*GetInfoReq) Marshal

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

func (*GetInfoReq) MarshalTo

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

func (*GetInfoReq) ProtoMessage

func (*GetInfoReq) ProtoMessage()

func (*GetInfoReq) Reset

func (m *GetInfoReq) Reset()

func (*GetInfoReq) Size

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

func (*GetInfoReq) String

func (m *GetInfoReq) String() string

func (*GetInfoReq) Unmarshal

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

type Info

type Info struct {
	Mid      int64  `protobuf:"varint,1,opt,name=mid,proto3" json:"mid"`
	Platform string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform"`
	UnionId  string `protobuf:"bytes,3,opt,name=union_id,json=unionId,proto3" json:"unionid"`
	Expires  int64  `protobuf:"varint,4,opt,name=expires,proto3" json:"expires"`
}

func (*Info) Descriptor

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

func (*Info) GetExpires

func (m *Info) GetExpires() int64

func (*Info) GetMid

func (m *Info) GetMid() int64

func (*Info) GetPlatform

func (m *Info) GetPlatform() string

func (*Info) GetUnionId

func (m *Info) GetUnionId() string

func (*Info) Marshal

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

func (*Info) MarshalTo

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

func (*Info) ProtoMessage

func (*Info) ProtoMessage()

func (*Info) Reset

func (m *Info) Reset()

func (*Info) Size

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

func (*Info) String

func (m *Info) String() string

func (*Info) Unmarshal

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

type PassportSNSBMServer

type PassportSNSBMServer interface {
	// GetAuthorizeURL get authorize url
	GetAuthorizeURL(ctx context.Context, req *GetAuthorizeURLReq) (resp *GetAuthorizeURLReply, err error)

	// Bind bind sns account
	Bind(ctx context.Context, req *BindReq) (resp *EmptyReply, err error)

	// Unbind unbind sns account
	Unbind(ctx context.Context, req *UnbindReq) (resp *EmptyReply, err error)

	// GetInfo get info by mid
	GetInfo(ctx context.Context, req *GetInfoReq) (resp *GetInfoReply, err error)

	// GetInfoByCode get info by authorize code
	GetInfoByCode(ctx context.Context, req *GetInfoByCodeReq) (resp *GetInfoByCodeReply, err error)

	// UpdateInfo update info
	UpdateInfo(ctx context.Context, req *UpdateInfoReq) (resp *EmptyReply, err error)
}
var PassportSNSSvc PassportSNSBMServer

type PassportSNSClient

type PassportSNSClient interface {
	// GetAuthorizeURL get authorize url
	GetAuthorizeURL(ctx context.Context, in *GetAuthorizeURLReq, opts ...grpc.CallOption) (*GetAuthorizeURLReply, error)
	// Bind bind sns account
	Bind(ctx context.Context, in *BindReq, opts ...grpc.CallOption) (*EmptyReply, error)
	// Unbind unbind sns account
	Unbind(ctx context.Context, in *UnbindReq, opts ...grpc.CallOption) (*EmptyReply, error)
	// GetInfo get info by mid
	GetInfo(ctx context.Context, in *GetInfoReq, opts ...grpc.CallOption) (*GetInfoReply, error)
	// GetInfoByCode get info by authorize code
	GetInfoByCode(ctx context.Context, in *GetInfoByCodeReq, opts ...grpc.CallOption) (*GetInfoByCodeReply, error)
	// UpdateInfo update info
	UpdateInfo(ctx context.Context, in *UpdateInfoReq, opts ...grpc.CallOption) (*EmptyReply, error)
}

func NewPassportSNSClient

func NewPassportSNSClient(cc *grpc.ClientConn) PassportSNSClient

type PassportSNSServer

type PassportSNSServer interface {
	// GetAuthorizeURL get authorize url
	GetAuthorizeURL(context.Context, *GetAuthorizeURLReq) (*GetAuthorizeURLReply, error)
	// Bind bind sns account
	Bind(context.Context, *BindReq) (*EmptyReply, error)
	// Unbind unbind sns account
	Unbind(context.Context, *UnbindReq) (*EmptyReply, error)
	// GetInfo get info by mid
	GetInfo(context.Context, *GetInfoReq) (*GetInfoReply, error)
	// GetInfoByCode get info by authorize code
	GetInfoByCode(context.Context, *GetInfoByCodeReq) (*GetInfoByCodeReply, error)
	// UpdateInfo update info
	UpdateInfo(context.Context, *UpdateInfoReq) (*EmptyReply, error)
}

type UnbindReq

type UnbindReq struct {
	Mid      int64  `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty" form:"mid" validate:"required"`
	AppId    string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty" form:"appid"`
	Platform string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty" form:"platform" validate:"required"`
}

func (*UnbindReq) Descriptor

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

func (*UnbindReq) GetAppId

func (m *UnbindReq) GetAppId() string

func (*UnbindReq) GetMid

func (m *UnbindReq) GetMid() int64

func (*UnbindReq) GetPlatform

func (m *UnbindReq) GetPlatform() string

func (*UnbindReq) Marshal

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

func (*UnbindReq) MarshalTo

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

func (*UnbindReq) ProtoMessage

func (*UnbindReq) ProtoMessage()

func (*UnbindReq) Reset

func (m *UnbindReq) Reset()

func (*UnbindReq) Size

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

func (*UnbindReq) String

func (m *UnbindReq) String() string

func (*UnbindReq) Unmarshal

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

type UpdateInfoReq

type UpdateInfoReq struct {
	Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty" form:"platform" validate:"required"`
	AppId    string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty" form:"appid" validate:"required"`
	Mid      int64  `protobuf:"varint,3,opt,name=mid,proto3" json:"mid,omitempty" form:"mid" validate:"required"`
	OpenId   string `protobuf:"bytes,4,opt,name=open_id,json=openId,proto3" json:"open_id,omitempty" form:"openid" validate:"required"`
}

func (*UpdateInfoReq) Descriptor

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

func (*UpdateInfoReq) GetAppId

func (m *UpdateInfoReq) GetAppId() string

func (*UpdateInfoReq) GetMid

func (m *UpdateInfoReq) GetMid() int64

func (*UpdateInfoReq) GetOpenId

func (m *UpdateInfoReq) GetOpenId() string

func (*UpdateInfoReq) GetPlatform

func (m *UpdateInfoReq) GetPlatform() string

func (*UpdateInfoReq) Marshal

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

func (*UpdateInfoReq) MarshalTo

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

func (*UpdateInfoReq) ProtoMessage

func (*UpdateInfoReq) ProtoMessage()

func (*UpdateInfoReq) Reset

func (m *UpdateInfoReq) Reset()

func (*UpdateInfoReq) Size

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

func (*UpdateInfoReq) String

func (m *UpdateInfoReq) String() string

func (*UpdateInfoReq) Unmarshal

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

Jump to

Keyboard shortcuts

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