model

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: 6 Imported by: 0

Documentation

Overview

Package model is a generated protocol buffer package.

It is generated from these files:

sns.proto

It has these top-level messages:

SnsProto
Oauth2Proto

Index

Constants

View Source
const (
	PlatformQQ    = 1
	PlatformWEIBO = 2

	PlatformAll      = "all"
	PlatformQQStr    = "qq"
	PlatformWEIBOStr = "weibo"
)

platform

View Source
const (
	BusinessMain = 10
	BusinessMall = 20
)

business

View Source
const (
	OperateBind   = 1
	OperateUnbind = 2
	OperateDelete = 3
	OperateLogin  = 4
)

operate

Variables

View Source
var (
	ErrInvalidLengthSns = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSns   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type CheckBindResp

type CheckBindResp struct {
	Bind bool  `json:"bind"`
	Mid  int64 `json:"mid"`
}

CheckBindResp .

type Oauth2Info

type Oauth2Info struct {
	UnionID string `json:"unionid"`
	OpenID  string `json:"openid"`
	Token   string `json:"access_token"`
	Refresh string `json:"refresh_token"`
	Expires int64  `json:"expires"`
}

Oauth2Info oauth2 info

type Oauth2Proto

type Oauth2Proto struct {
	Mid      int64  `protobuf:"varint,1,opt,name=Mid,proto3" json:"mid"`
	UnionID  string `protobuf:"bytes,2,opt,name=UnionID,proto3" json:"unionid"`
	OpenID   string `protobuf:"bytes,3,opt,name=OpenID,proto3" json:"openid"`
	Platform int32  `protobuf:"varint,4,opt,name=Platform,proto3" json:"platform"`
	AppID    string `protobuf:"bytes,5,opt,name=AppID,proto3" json:"appid"`
	Token    string `protobuf:"bytes,6,opt,name=Token,proto3" json:"token"`
	Expires  int64  `protobuf:"varint,7,opt,name=Expires,proto3" json:"expires"`
}

func (*Oauth2Proto) Descriptor

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

func (*Oauth2Proto) GetAppID

func (m *Oauth2Proto) GetAppID() string

func (*Oauth2Proto) GetExpires

func (m *Oauth2Proto) GetExpires() int64

func (*Oauth2Proto) GetMid

func (m *Oauth2Proto) GetMid() int64

func (*Oauth2Proto) GetOpenID

func (m *Oauth2Proto) GetOpenID() string

func (*Oauth2Proto) GetPlatform

func (m *Oauth2Proto) GetPlatform() int32

func (*Oauth2Proto) GetToken

func (m *Oauth2Proto) GetToken() string

func (*Oauth2Proto) GetUnionID

func (m *Oauth2Proto) GetUnionID() string

func (*Oauth2Proto) Marshal

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

func (*Oauth2Proto) MarshalTo

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

func (*Oauth2Proto) ProtoMessage

func (*Oauth2Proto) ProtoMessage()

func (*Oauth2Proto) Reset

func (m *Oauth2Proto) Reset()

func (*Oauth2Proto) Size

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

func (*Oauth2Proto) String

func (m *Oauth2Proto) String() string

func (*Oauth2Proto) Unmarshal

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

type QQAccessResp

type QQAccessResp struct {
	Token       string `json:"access_token"`
	Refresh     string `json:"refresh_token"`
	Expires     int64  `json:"expires_in"`
	Code        int    `json:"error"`
	Description string `json:"error_description"`
}

QQAccessResp qq access response

type QQOpenIDResp

type QQOpenIDResp struct {
	UnionID     string `json:"unionid"`
	OpenID      string `json:"openid"`
	Code        int    `json:"error"`
	Description string `json:"error_description"`
}

QQOpenIDResp qq open id response

type SnsApps

type SnsApps struct {
	AppID     string
	AppSecret string
	Platform  int
	Business  int
}

SnsApps .

type SnsLog

type SnsLog struct {
	Mid         int64  `json:"mid"`
	OpenID      string `json:"openid"`
	UnionID     string `json:"unionid"`
	AppID       string `json:"appid"`
	Platform    int    `json:"platform"`
	Operator    string `json:"operator"`
	Operate     int    `json:"operate"`
	Description string `json:"description"`
}

SnsLog .

type SnsOpenID

type SnsOpenID struct {
	Mid      int64  `json:"mid"`
	OpenID   string `json:"openid"`
	UnionID  string `json:"unionid"`
	AppID    string `json:"appid"`
	Platform int    `json:"platform"`
}

SnsOpenID .

type SnsProto

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

func (*SnsProto) ConvertToInfo

func (p *SnsProto) ConvertToInfo() *api.Info

ConvertToInfo .

func (*SnsProto) Descriptor

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

func (*SnsProto) GetExpires

func (m *SnsProto) GetExpires() int64

func (*SnsProto) GetMid

func (m *SnsProto) GetMid() int64

func (*SnsProto) GetPlatform

func (m *SnsProto) GetPlatform() int32

func (*SnsProto) GetUnionID

func (m *SnsProto) GetUnionID() string

func (*SnsProto) Marshal

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

func (*SnsProto) MarshalTo

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

func (*SnsProto) ProtoMessage

func (*SnsProto) ProtoMessage()

func (*SnsProto) Reset

func (m *SnsProto) Reset()

func (*SnsProto) Size

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

func (*SnsProto) String

func (m *SnsProto) String() string

func (*SnsProto) Unmarshal

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

type SnsToken

type SnsToken struct {
	Mid      int64  `json:"mid"`
	OpenID   string `json:"openid"`
	UnionID  string `json:"unionid"`
	Platform int    `json:"platform"`
	Token    string `json:"token"`
	Expires  int64  `json:"expires"`
	AppID    string `json:"appid"`
}

SnsToken .

type SnsUser

type SnsUser struct {
	Mid      int64  `json:"mid"`
	UnionID  string `json:"unionid"`
	Platform int    `json:"platform"`
	Expires  int64  `json:"expires"`
}

SnsUser .

func (*SnsUser) ConvertToProto

func (t *SnsUser) ConvertToProto() *SnsProto

ConvertToProto .

type WeiboAccessResp

type WeiboAccessResp struct {
	Token       string `json:"access_token"`
	Refresh     string `json:"refresh_token"`
	Expires     int64  `json:"expires_in"` // access_token的生命周期,单位是秒数
	OpenID      string `json:"uid"`
	Code        int    `json:"error_code"`
	Error       string `json:"error"`
	Description string `json:"error_description"`
}

WeiboAccessResp weibo access response

Jump to

Keyboard shortcuts

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