Initial open source release
This commit is contained in:
commit
74992e893f
377 changed files with 118084 additions and 0 deletions
33
internal/mtprotoedge/destroy_auth_key.go
Normal file
33
internal/mtprotoedge/destroy_auth_key.go
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
package mtprotoedge
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gotd/td/bin"
|
||||
)
|
||||
|
||||
const (
|
||||
destroyAuthKeyRequestTypeID = 0xd1435160
|
||||
destroyAuthKeyOkTypeID = 0xf660e1d4
|
||||
)
|
||||
|
||||
type destroyAuthKeyRequest struct{}
|
||||
|
||||
func (*destroyAuthKeyRequest) Encode(b *bin.Buffer) error {
|
||||
b.PutID(destroyAuthKeyRequestTypeID)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (*destroyAuthKeyRequest) Decode(b *bin.Buffer) error {
|
||||
if err := b.ConsumeID(destroyAuthKeyRequestTypeID); err != nil {
|
||||
return fmt.Errorf("decode destroy_auth_key: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type destroyAuthKeyOk struct{}
|
||||
|
||||
func (*destroyAuthKeyOk) Encode(b *bin.Buffer) error {
|
||||
b.PutID(destroyAuthKeyOkTypeID)
|
||||
return nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue