auth

package
v0.87.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Predicate_auth_exportLoginToken = "auth_exportLoginToken"
	Predicate_auth_importLoginToken = "auth_importLoginToken"
	Predicate_auth_acceptLoginToken = "auth_acceptLoginToken"
)

Variables

View Source
var (
	ErrInvalidLengthAuthTl        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAuthTl          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAuthTl = fmt.Errorf("proto: unexpected end of group")
)
View Source
var TLConstructor_name = map[int32]string{
	0:           "CRC32_UNKNOWN",
	-1210022402: "CRC32_auth_exportLoginToken",
	-1783866140: "CRC32_auth_importLoginToken",
	-392909491:  "CRC32_auth_acceptLoginToken",
}
View Source
var TLConstructor_value = map[string]int32{
	"CRC32_UNKNOWN":               0,
	"CRC32_auth_exportLoginToken": -1210022402,
	"CRC32_auth_importLoginToken": -1783866140,
	"CRC32_auth_acceptLoginToken": -392909491,
}

Functions

func CheckClassID

func CheckClassID(classId int32) (ok bool)

func GetClazzID

func GetClazzID(clazzName string, layer int) int32

func GetRPCContextRegisters

func GetRPCContextRegisters() map[string]RPCContextTuple

func NewTLObjectByClassID

func NewTLObjectByClassID(classId int32) mtproto.TLObject

func RegisterRPCAuthServer

func RegisterRPCAuthServer(s *grpc.Server, srv RPCAuthServer)

Types

type RPCAuthClient

type RPCAuthClient interface {
	// auth.exportLoginToken api_id:int api_hash:string except_ids:Vector<long> = auth.LoginToken;
	AuthExportLoginToken(ctx context.Context, in *TLAuthExportLoginToken, opts ...grpc.CallOption) (*mtproto.Auth_LoginToken, error)
	// auth.importLoginToken token:bytes = auth.LoginToken;
	AuthImportLoginToken(ctx context.Context, in *TLAuthImportLoginToken, opts ...grpc.CallOption) (*mtproto.Auth_LoginToken, error)
	// auth.acceptLoginToken token:bytes = Authorization;
	AuthAcceptLoginToken(ctx context.Context, in *TLAuthAcceptLoginToken, opts ...grpc.CallOption) (*mtproto.Authorization, error)
}

RPCAuthClient is the client API for RPCAuth service.

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

func NewRPCAuthClient

func NewRPCAuthClient(cc *grpc.ClientConn) RPCAuthClient

type RPCAuthServer

type RPCAuthServer interface {
	// auth.exportLoginToken api_id:int api_hash:string except_ids:Vector<long> = auth.LoginToken;
	AuthExportLoginToken(context.Context, *TLAuthExportLoginToken) (*mtproto.Auth_LoginToken, error)
	// auth.importLoginToken token:bytes = auth.LoginToken;
	AuthImportLoginToken(context.Context, *TLAuthImportLoginToken) (*mtproto.Auth_LoginToken, error)
	// auth.acceptLoginToken token:bytes = Authorization;
	AuthAcceptLoginToken(context.Context, *TLAuthAcceptLoginToken) (*mtproto.Authorization, error)
}

RPCAuthServer is the server API for RPCAuth service.

type RPCContextTuple

type RPCContextTuple struct {
	Method       string
	NewReplyFunc newRPCReplyFunc
}

func FindRPCContextTuple

func FindRPCContextTuple(t interface{}) *RPCContextTuple

type TLAuthAcceptLoginToken

type TLAuthAcceptLoginToken struct {
	Constructor          TLConstructor `protobuf:"varint,1,opt,name=constructor,proto3,enum=auth.TLConstructor" json:"constructor,omitempty"`
	Token                []byte        `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

-------------------------------------------------------------------------------------------- auth.acceptLoginToken token:bytes = Authorization;

func (*TLAuthAcceptLoginToken) CalcByteSize

func (m *TLAuthAcceptLoginToken) CalcByteSize(layer int32) int

func (*TLAuthAcceptLoginToken) DebugString

func (m *TLAuthAcceptLoginToken) DebugString() string

func (*TLAuthAcceptLoginToken) Decode

func (m *TLAuthAcceptLoginToken) Decode(dBuf *mtproto.DecodeBuf) error

func (*TLAuthAcceptLoginToken) Descriptor

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

func (*TLAuthAcceptLoginToken) Encode

func (m *TLAuthAcceptLoginToken) Encode(layer int32) []byte

TLAuthAcceptLoginToken /////////////////////////////////////////////////////////////////////////////

func (*TLAuthAcceptLoginToken) GetConstructor

func (m *TLAuthAcceptLoginToken) GetConstructor() TLConstructor

func (*TLAuthAcceptLoginToken) GetToken

func (m *TLAuthAcceptLoginToken) GetToken() []byte

func (*TLAuthAcceptLoginToken) GoString

func (this *TLAuthAcceptLoginToken) GoString() string

func (*TLAuthAcceptLoginToken) Marshal

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

func (*TLAuthAcceptLoginToken) MarshalTo

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

func (*TLAuthAcceptLoginToken) MarshalToSizedBuffer

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

func (*TLAuthAcceptLoginToken) ProtoMessage

func (*TLAuthAcceptLoginToken) ProtoMessage()

func (*TLAuthAcceptLoginToken) Reset

func (m *TLAuthAcceptLoginToken) Reset()

func (*TLAuthAcceptLoginToken) Size

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

func (*TLAuthAcceptLoginToken) String

func (m *TLAuthAcceptLoginToken) String() string

func (*TLAuthAcceptLoginToken) Unmarshal

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

func (*TLAuthAcceptLoginToken) XXX_DiscardUnknown

func (m *TLAuthAcceptLoginToken) XXX_DiscardUnknown()

func (*TLAuthAcceptLoginToken) XXX_Marshal

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

func (*TLAuthAcceptLoginToken) XXX_Merge

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

func (*TLAuthAcceptLoginToken) XXX_Size

func (m *TLAuthAcceptLoginToken) XXX_Size() int

func (*TLAuthAcceptLoginToken) XXX_Unmarshal

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

type TLAuthExportLoginToken

type TLAuthExportLoginToken struct {
	Constructor          TLConstructor `protobuf:"varint,1,opt,name=constructor,proto3,enum=auth.TLConstructor" json:"constructor,omitempty"`
	ApiId                int32         `protobuf:"varint,3,opt,name=api_id,json=apiId,proto3" json:"api_id,omitempty"`
	ApiHash              string        `protobuf:"bytes,4,opt,name=api_hash,json=apiHash,proto3" json:"api_hash,omitempty"`
	ExceptIds            []int64       `protobuf:"varint,5,rep,packed,name=except_ids,json=exceptIds,proto3" json:"except_ids,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

-------------------------------------------------------------------------------------------- auth.exportLoginToken api_id:int api_hash:string except_ids:Vector<long> = auth.LoginToken;

func (*TLAuthExportLoginToken) CalcByteSize

func (m *TLAuthExportLoginToken) CalcByteSize(layer int32) int

func (*TLAuthExportLoginToken) DebugString

func (m *TLAuthExportLoginToken) DebugString() string

func (*TLAuthExportLoginToken) Decode

func (m *TLAuthExportLoginToken) Decode(dBuf *mtproto.DecodeBuf) error

func (*TLAuthExportLoginToken) Descriptor

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

func (*TLAuthExportLoginToken) Encode

func (m *TLAuthExportLoginToken) Encode(layer int32) []byte

---------------------------------------------------------------------------------------------------------------- TLAuthExportLoginToken /////////////////////////////////////////////////////////////////////////////

func (*TLAuthExportLoginToken) GetApiHash

func (m *TLAuthExportLoginToken) GetApiHash() string

func (*TLAuthExportLoginToken) GetApiId

func (m *TLAuthExportLoginToken) GetApiId() int32

func (*TLAuthExportLoginToken) GetConstructor

func (m *TLAuthExportLoginToken) GetConstructor() TLConstructor

func (*TLAuthExportLoginToken) GetExceptIds

func (m *TLAuthExportLoginToken) GetExceptIds() []int64

func (*TLAuthExportLoginToken) GoString

func (this *TLAuthExportLoginToken) GoString() string

func (*TLAuthExportLoginToken) Marshal

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

func (*TLAuthExportLoginToken) MarshalTo

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

func (*TLAuthExportLoginToken) MarshalToSizedBuffer

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

func (*TLAuthExportLoginToken) ProtoMessage

func (*TLAuthExportLoginToken) ProtoMessage()

func (*TLAuthExportLoginToken) Reset

func (m *TLAuthExportLoginToken) Reset()

func (*TLAuthExportLoginToken) Size

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

func (*TLAuthExportLoginToken) String

func (m *TLAuthExportLoginToken) String() string

func (*TLAuthExportLoginToken) Unmarshal

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

func (*TLAuthExportLoginToken) XXX_DiscardUnknown

func (m *TLAuthExportLoginToken) XXX_DiscardUnknown()

func (*TLAuthExportLoginToken) XXX_Marshal

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

func (*TLAuthExportLoginToken) XXX_Merge

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

func (*TLAuthExportLoginToken) XXX_Size

func (m *TLAuthExportLoginToken) XXX_Size() int

func (*TLAuthExportLoginToken) XXX_Unmarshal

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

type TLAuthImportLoginToken

type TLAuthImportLoginToken struct {
	Constructor          TLConstructor `protobuf:"varint,1,opt,name=constructor,proto3,enum=auth.TLConstructor" json:"constructor,omitempty"`
	Token                []byte        `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

-------------------------------------------------------------------------------------------- auth.importLoginToken token:bytes = auth.LoginToken;

func (*TLAuthImportLoginToken) CalcByteSize

func (m *TLAuthImportLoginToken) CalcByteSize(layer int32) int

func (*TLAuthImportLoginToken) DebugString

func (m *TLAuthImportLoginToken) DebugString() string

func (*TLAuthImportLoginToken) Decode

func (m *TLAuthImportLoginToken) Decode(dBuf *mtproto.DecodeBuf) error

func (*TLAuthImportLoginToken) Descriptor

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

func (*TLAuthImportLoginToken) Encode

func (m *TLAuthImportLoginToken) Encode(layer int32) []byte

TLAuthImportLoginToken /////////////////////////////////////////////////////////////////////////////

func (*TLAuthImportLoginToken) GetConstructor

func (m *TLAuthImportLoginToken) GetConstructor() TLConstructor

func (*TLAuthImportLoginToken) GetToken

func (m *TLAuthImportLoginToken) GetToken() []byte

func (*TLAuthImportLoginToken) GoString

func (this *TLAuthImportLoginToken) GoString() string

func (*TLAuthImportLoginToken) Marshal

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

func (*TLAuthImportLoginToken) MarshalTo

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

func (*TLAuthImportLoginToken) MarshalToSizedBuffer

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

func (*TLAuthImportLoginToken) ProtoMessage

func (*TLAuthImportLoginToken) ProtoMessage()

func (*TLAuthImportLoginToken) Reset

func (m *TLAuthImportLoginToken) Reset()

func (*TLAuthImportLoginToken) Size

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

func (*TLAuthImportLoginToken) String

func (m *TLAuthImportLoginToken) String() string

func (*TLAuthImportLoginToken) Unmarshal

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

func (*TLAuthImportLoginToken) XXX_DiscardUnknown

func (m *TLAuthImportLoginToken) XXX_DiscardUnknown()

func (*TLAuthImportLoginToken) XXX_Marshal

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

func (*TLAuthImportLoginToken) XXX_Merge

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

func (*TLAuthImportLoginToken) XXX_Size

func (m *TLAuthImportLoginToken) XXX_Size() int

func (*TLAuthImportLoginToken) XXX_Unmarshal

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

type TLConstructor

type TLConstructor int32
const (
	CRC32_UNKNOWN               TLConstructor = 0
	CRC32_auth_exportLoginToken TLConstructor = -1210022402
	CRC32_auth_importLoginToken TLConstructor = -1783866140
	CRC32_auth_acceptLoginToken TLConstructor = -392909491
)

func (TLConstructor) EnumDescriptor

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

func (TLConstructor) String

func (x TLConstructor) String() string

type UnimplementedRPCAuthServer

type UnimplementedRPCAuthServer struct {
}

UnimplementedRPCAuthServer can be embedded to have forward compatible implementations.

func (*UnimplementedRPCAuthServer) AuthAcceptLoginToken

func (*UnimplementedRPCAuthServer) AuthExportLoginToken

func (*UnimplementedRPCAuthServer) AuthImportLoginToken

Jump to

Keyboard shortcuts

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