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

Documentation

Overview

Package model is a generated protocol buffer package.

It is generated from these files:

auth.proto

It has these top-level messages:

AuthReply
Cookie
Token
Refresh

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type ArgCookie

type ArgCookie struct {
	Mid, Expires int64
	PWD          string
}

ArgCookie rpc cookie arg.

type ArgRefreshToken

type ArgRefreshToken struct {
	AppID        int32
	RefreshToken string
}

ArgRefreshToken rpc refreshToken arg

type ArgToken

type ArgToken struct {
	AppID, SubID int32
	Mid          int64
}

ArgToken rpc token arg.

type AuthReply

type AuthReply struct {
	// if cookie or token in life time, login is true
	// else login is false and mid csrf expires is empty
	Login bool `protobuf:"varint,1,opt,name=Login,proto3" json:"login"`
	// user identify id
	Mid int64 `protobuf:"varint,2,opt,name=Mid,proto3" json:"mid"`
	// use cookie request this field will return
	// use token request ignore this field
	CSRF string `protobuf:"bytes,3,opt,name=CSRF,proto3" json:"csrf_token"`
	// expiration date
	// unix timestamp
	Expires int64 `protobuf:"varint,4,opt,name=Expires,proto3" json:"expires"`
}

AuthReply auth reply

func (*AuthReply) Descriptor

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

func (*AuthReply) GetCSRF

func (m *AuthReply) GetCSRF() string

func (*AuthReply) GetExpires

func (m *AuthReply) GetExpires() int64

func (*AuthReply) GetLogin

func (m *AuthReply) GetLogin() bool

func (*AuthReply) GetMid

func (m *AuthReply) GetMid() int64

func (*AuthReply) Marshal

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

func (*AuthReply) MarshalTo

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

func (*AuthReply) ProtoMessage

func (*AuthReply) ProtoMessage()

func (*AuthReply) Reset

func (m *AuthReply) Reset()

func (*AuthReply) Size

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

func (*AuthReply) String

func (m *AuthReply) String() string

func (*AuthReply) Unmarshal

func (m *AuthReply) Unmarshal(dAtA []byte) error
type Cookie struct {
	Mid     int64  `protobuf:"varint,1,opt,name=Mid,proto3" json:"mid"`
	Session string `protobuf:"bytes,2,opt,name=Session,proto3" json:"session"`
	CSRF    string `protobuf:"bytes,3,opt,name=CSRF,proto3" json:"csrf"`
	Type    int64  `protobuf:"varint,4,opt,name=Type,proto3" json:"type"`
	Expires int64  `protobuf:"varint,5,opt,name=Expires,proto3" json:"expires"`
}

func (*Cookie) Descriptor

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

func (*Cookie) GetCSRF

func (m *Cookie) GetCSRF() string

func (*Cookie) GetExpires

func (m *Cookie) GetExpires() int64

func (*Cookie) GetMid

func (m *Cookie) GetMid() int64

func (*Cookie) GetSession

func (m *Cookie) GetSession() string

func (*Cookie) GetType

func (m *Cookie) GetType() int64

func (*Cookie) Marshal

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

func (*Cookie) MarshalTo

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

func (*Cookie) ProtoMessage

func (*Cookie) ProtoMessage()

func (*Cookie) Reset

func (m *Cookie) Reset()

func (*Cookie) Size

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

func (*Cookie) String

func (m *Cookie) String() string

func (*Cookie) Unmarshal

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

type CookieResp

type CookieResp struct {
	Mid     int64  `json:"mid"`
	Session string `json:"session"`
	CSRF    string `json:"csrf"`
	Expires int64  `json:"expires"`
}

CookieResp cookie response

type Refresh

type Refresh struct {
	Mid     int64  `protobuf:"varint,1,opt,name=Mid,proto3" json:"mid"`
	AppID   int32  `protobuf:"varint,2,opt,name=AppID,proto3" json:"appid"`
	Refresh string `protobuf:"bytes,3,opt,name=Refresh,proto3" json:"refresh"`
	Token   string `protobuf:"bytes,4,opt,name=Token,proto3" json:"token"`
	Expires int64  `protobuf:"varint,5,opt,name=Expires,proto3" json:"expires"`
}

func (*Refresh) Descriptor

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

func (*Refresh) GetAppID

func (m *Refresh) GetAppID() int32

func (*Refresh) GetExpires

func (m *Refresh) GetExpires() int64

func (*Refresh) GetMid

func (m *Refresh) GetMid() int64

func (*Refresh) GetRefresh

func (m *Refresh) GetRefresh() string

func (*Refresh) GetToken

func (m *Refresh) GetToken() string

func (*Refresh) Marshal

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

func (*Refresh) MarshalTo

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

func (*Refresh) ProtoMessage

func (*Refresh) ProtoMessage()

func (*Refresh) Reset

func (m *Refresh) Reset()

func (*Refresh) Size

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

func (*Refresh) String

func (m *Refresh) String() string

func (*Refresh) Unmarshal

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

type RefreshTokenResp

type RefreshTokenResp struct {
	Mid          int64  `json:"mid"`
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	Expires      int64  `json:"expires"`
}

RefreshTokenResp refreshToken response

type Token

type Token struct {
	Mid     int64  `protobuf:"varint,1,opt,name=Mid,proto3" json:"mid"`
	AppID   int32  `protobuf:"varint,2,opt,name=AppID,proto3" json:"appid"`
	Token   string `protobuf:"bytes,3,opt,name=Token,proto3" json:"token"`
	Type    int64  `protobuf:"varint,4,opt,name=Type,proto3" json:"type"`
	Expires int64  `protobuf:"varint,5,opt,name=Expires,proto3" json:"expires"`
}

func (*Token) Descriptor

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

func (*Token) GetAppID

func (m *Token) GetAppID() int32

func (*Token) GetExpires

func (m *Token) GetExpires() int64

func (*Token) GetMid

func (m *Token) GetMid() int64

func (*Token) GetToken

func (m *Token) GetToken() string

func (*Token) GetType

func (m *Token) GetType() int64

func (*Token) Marshal

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

func (*Token) MarshalTo

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

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) Reset

func (m *Token) Reset()

func (*Token) Size

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

func (*Token) String

func (m *Token) String() string

func (*Token) Unmarshal

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

Jump to

Keyboard shortcuts

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