mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: crenshaw-dev <[email protected]>
3432 lines
86 KiB
Go
Generated
3432 lines
86 KiB
Go
Generated
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: server/account/account.proto
|
|
|
|
package account
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
type UpdatePasswordRequest struct {
|
|
NewPassword string `protobuf:"bytes,1,opt,name=newPassword,proto3" json:"newPassword,omitempty"`
|
|
CurrentPassword string `protobuf:"bytes,2,opt,name=currentPassword,proto3" json:"currentPassword,omitempty"`
|
|
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *UpdatePasswordRequest) Reset() { *m = UpdatePasswordRequest{} }
|
|
func (m *UpdatePasswordRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*UpdatePasswordRequest) ProtoMessage() {}
|
|
func (*UpdatePasswordRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_56d089a9b5e998c0, []int{0}
|
|
}
|
|
func (m *UpdatePasswordRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *UpdatePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_UpdatePasswordRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *UpdatePasswordRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_UpdatePasswordRequest.Merge(m, src)
|
|
}
|
|
func (m *UpdatePasswordRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *UpdatePasswordRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_UpdatePasswordRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_UpdatePasswordRequest proto.InternalMessageInfo
|
|
|
|
func (m *UpdatePasswordRequest) GetNewPassword() string {
|
|
if m != nil {
|
|
return m.NewPassword
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *UpdatePasswordRequest) GetCurrentPassword() string {
|
|
if m != nil {
|
|
return m.CurrentPassword
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *UpdatePasswordRequest) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type UpdatePasswordResponse struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *UpdatePasswordResponse) Reset() { *m = UpdatePasswordResponse{} }
|
|
func (m *UpdatePasswordResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*UpdatePasswordResponse) ProtoMessage() {}
|
|
func (*UpdatePasswordResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_56d089a9b5e998c0, []int{1}
|
|
}
|
|
func (m *UpdatePasswordResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *UpdatePasswordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_UpdatePasswordResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *UpdatePasswordResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_UpdatePasswordResponse.Merge(m, src)
|
|
}
|
|
func (m *UpdatePasswordResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *UpdatePasswordResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_UpdatePasswordResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_UpdatePasswordResponse proto.InternalMessageInfo
|
|
|
|
type CanIRequest struct {
|
|
Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
|
|
Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
|
|
Subresource string `protobuf:"bytes,3,opt,name=subresource,proto3" json:"subresource,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CanIRequest) Reset() { *m = CanIRequest{} }
|
|
func (m *CanIRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*CanIRequest) ProtoMessage() {}
|
|
func (*CanIRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_56d089a9b5e998c0, []int{2}
|
|
}
|
|
func (m *CanIRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *CanIRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_CanIRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *CanIRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CanIRequest.Merge(m, src)
|
|
}
|
|
func (m *CanIRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *CanIRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CanIRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CanIRequest proto.InternalMessageInfo
|
|
|
|
func (m *CanIRequest) GetResource() string {
|
|
if m != nil {
|
|
return m.Resource
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *CanIRequest) GetAction() string {
|
|
if m != nil {
|
|
return m.Action
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *CanIRequest) GetSubresource() string {
|
|
if m != nil {
|
|
return m.Subresource
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CanIResponse struct {
|
|
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CanIResponse) Reset() { *m = CanIResponse{} }
|
|
func (m *CanIResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*CanIResponse) ProtoMessage() {}
|
|
func (*CanIResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_56d089a9b5e998c0, []int{3}
|
|
}
|
|
func (m *CanIResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *CanIResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_CanIResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *CanIResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CanIResponse.Merge(m, src)
|
|
}
|
|
func (m *CanIResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *CanIResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CanIResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CanIResponse proto.InternalMessageInfo
|
|
|
|
func (m *CanIResponse) GetValue() string {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetAccountRequest struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *GetAccountRequest) Reset() { *m = GetAccountRequest{} }
|
|
func (m *GetAccountRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*GetAccountRequest) ProtoMessage() {}
|
|
func (*GetAccountRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_56d089a9b5e998c0, []int{4}
|
|
}
|
|
func (m *GetAccountRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *GetAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_GetAccountRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *GetAccountRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_GetAccountRequest.Merge(m, src)
|
|
}
|
|
func (m *GetAccountRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *GetAccountRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_GetAccountRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_GetAccountRequest proto.InternalMessageInfo
|
|
|
|
func (m *GetAccountRequest) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type Account struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"`
|
|
Capabilities []string `protobuf:"bytes,3,rep,name=capabilities,proto3" json:"capabilities,omitempty"`
|
|
Tokens []*Token `protobuf:"bytes,4,rep,name=tokens,proto3" json:"tokens,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Account) Reset() { *m = Account{} }
|
|
func (m *Account) String() string { return proto.CompactTextString(m) }
|
|
func (*Account) ProtoMessage() {}
|
|
func (*Account) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_56d089a9b5e998c0, []int{5}
|
|
}
|
|
func (m *Account) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Account.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Account) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Account.Merge(m, src)
|
|
}
|
|
func (m *Account) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Account) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Account.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Account proto.InternalMessageInfo
|
|
|
|
func (m *Account) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Account) GetEnabled() bool {
|
|
if m != nil {
|
|
return m.Enabled
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *Account) GetCapabilities() []string {
|
|
if m != nil {
|
|
return m.Capabilities
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Account) GetTokens() []*Token {
|
|
if m != nil {
|
|
return m.Tokens
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type AccountsList struct {
|
|
Items []*Account `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *AccountsList) Reset() { *m = AccountsList{} }
|
|
func (m *AccountsList) String() string { return proto.CompactTextString(m) }
|
|
func (*AccountsList) ProtoMessage() {}
|
|
func (*AccountsList) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_56d089a9b5e998c0, []int{6}
|
|
}
|
|
func (m *AccountsList) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *AccountsList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_AccountsList.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *AccountsList) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AccountsList.Merge(m, src)
|
|
}
|
|
func (m *AccountsList) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *AccountsList) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AccountsList.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AccountsList proto.InternalMessageInfo
|
|
|
|
func (m *AccountsList) GetItems() []*Account {
|
|
if m != nil {
|
|
return m.Items
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Token struct {
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
IssuedAt int64 `protobuf:"varint,2,opt,name=issuedAt,proto3" json:"issuedAt,omitempty"`
|
|
ExpiresAt int64 `protobuf:"varint,3,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Token) Reset() { *m = Token{} }
|
|
func (m *Token) String() string { return proto.CompactTextString(m) }
|
|
func (*Token) ProtoMessage() {}
|
|
func (*Token) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_56d089a9b5e998c0, []int{7}
|
|
}
|
|
func (m *Token) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Token.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Token) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Token.Merge(m, src)
|
|
}
|
|
func (m *Token) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Token) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Token.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Token proto.InternalMessageInfo
|
|
|
|
func (m *Token) GetId() string {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Token) GetIssuedAt() int64 {
|
|
if m != nil {
|
|
return m.IssuedAt
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Token) GetExpiresAt() int64 {
|
|
if m != nil {
|
|
return m.ExpiresAt
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type TokensList struct {
|
|
Items []*Token `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *TokensList) Reset() { *m = TokensList{} }
|
|
func (m *TokensList) String() string { return proto.CompactTextString(m) }
|
|
func (*TokensList) ProtoMessage() {}
|
|
func (*TokensList) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_56d089a9b5e998c0, []int{8}
|
|
}
|
|
func (m *TokensList) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *TokensList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_TokensList.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *TokensList) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TokensList.Merge(m, src)
|
|
}
|
|
func (m *TokensList) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *TokensList) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TokensList.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TokensList proto.InternalMessageInfo
|
|
|
|
func (m *TokensList) GetItems() []*Token {
|
|
if m != nil {
|
|
return m.Items
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type CreateTokenRequest struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
// expiresIn represents a duration in seconds
|
|
ExpiresIn int64 `protobuf:"varint,2,opt,name=expiresIn,proto3" json:"expiresIn,omitempty"`
|
|
Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CreateTokenRequest) Reset() { *m = CreateTokenRequest{} }
|
|
func (m *CreateTokenRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*CreateTokenRequest) ProtoMessage() {}
|
|
func (*CreateTokenRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_56d089a9b5e998c0, []int{9}
|
|
}
|
|
func (m *CreateTokenRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *CreateTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_CreateTokenRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *CreateTokenRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CreateTokenRequest.Merge(m, src)
|
|
}
|
|
func (m *CreateTokenRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *CreateTokenRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CreateTokenRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CreateTokenRequest proto.InternalMessageInfo
|
|
|
|
func (m *CreateTokenRequest) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *CreateTokenRequest) GetExpiresIn() int64 {
|
|
if m != nil {
|
|
return m.ExpiresIn
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *CreateTokenRequest) GetId() string {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CreateTokenResponse struct {
|
|
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CreateTokenResponse) Reset() { *m = CreateTokenResponse{} }
|
|
func (m *CreateTokenResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*CreateTokenResponse) ProtoMessage() {}
|
|
func (*CreateTokenResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_56d089a9b5e998c0, []int{10}
|
|
}
|
|
func (m *CreateTokenResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *CreateTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_CreateTokenResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *CreateTokenResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CreateTokenResponse.Merge(m, src)
|
|
}
|
|
func (m *CreateTokenResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *CreateTokenResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CreateTokenResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CreateTokenResponse proto.InternalMessageInfo
|
|
|
|
func (m *CreateTokenResponse) GetToken() string {
|
|
if m != nil {
|
|
return m.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeleteTokenRequest struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *DeleteTokenRequest) Reset() { *m = DeleteTokenRequest{} }
|
|
func (m *DeleteTokenRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*DeleteTokenRequest) ProtoMessage() {}
|
|
func (*DeleteTokenRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_56d089a9b5e998c0, []int{11}
|
|
}
|
|
func (m *DeleteTokenRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *DeleteTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_DeleteTokenRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *DeleteTokenRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DeleteTokenRequest.Merge(m, src)
|
|
}
|
|
func (m *DeleteTokenRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *DeleteTokenRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DeleteTokenRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DeleteTokenRequest proto.InternalMessageInfo
|
|
|
|
func (m *DeleteTokenRequest) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *DeleteTokenRequest) GetId() string {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListAccountRequest struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ListAccountRequest) Reset() { *m = ListAccountRequest{} }
|
|
func (m *ListAccountRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ListAccountRequest) ProtoMessage() {}
|
|
func (*ListAccountRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_56d089a9b5e998c0, []int{12}
|
|
}
|
|
func (m *ListAccountRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ListAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ListAccountRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ListAccountRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ListAccountRequest.Merge(m, src)
|
|
}
|
|
func (m *ListAccountRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ListAccountRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ListAccountRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ListAccountRequest proto.InternalMessageInfo
|
|
|
|
type EmptyResponse struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *EmptyResponse) Reset() { *m = EmptyResponse{} }
|
|
func (m *EmptyResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*EmptyResponse) ProtoMessage() {}
|
|
func (*EmptyResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_56d089a9b5e998c0, []int{13}
|
|
}
|
|
func (m *EmptyResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *EmptyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_EmptyResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *EmptyResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_EmptyResponse.Merge(m, src)
|
|
}
|
|
func (m *EmptyResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *EmptyResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_EmptyResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_EmptyResponse proto.InternalMessageInfo
|
|
|
|
func init() {
|
|
proto.RegisterType((*UpdatePasswordRequest)(nil), "account.UpdatePasswordRequest")
|
|
proto.RegisterType((*UpdatePasswordResponse)(nil), "account.UpdatePasswordResponse")
|
|
proto.RegisterType((*CanIRequest)(nil), "account.CanIRequest")
|
|
proto.RegisterType((*CanIResponse)(nil), "account.CanIResponse")
|
|
proto.RegisterType((*GetAccountRequest)(nil), "account.GetAccountRequest")
|
|
proto.RegisterType((*Account)(nil), "account.Account")
|
|
proto.RegisterType((*AccountsList)(nil), "account.AccountsList")
|
|
proto.RegisterType((*Token)(nil), "account.Token")
|
|
proto.RegisterType((*TokensList)(nil), "account.TokensList")
|
|
proto.RegisterType((*CreateTokenRequest)(nil), "account.CreateTokenRequest")
|
|
proto.RegisterType((*CreateTokenResponse)(nil), "account.CreateTokenResponse")
|
|
proto.RegisterType((*DeleteTokenRequest)(nil), "account.DeleteTokenRequest")
|
|
proto.RegisterType((*ListAccountRequest)(nil), "account.ListAccountRequest")
|
|
proto.RegisterType((*EmptyResponse)(nil), "account.EmptyResponse")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("server/account/account.proto", fileDescriptor_56d089a9b5e998c0) }
|
|
|
|
var fileDescriptor_56d089a9b5e998c0 = []byte{
|
|
// 738 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xcd, 0x6e, 0xd3, 0x4a,
|
|
0x14, 0x96, 0x93, 0xa6, 0x3f, 0x27, 0xb9, 0xe9, 0xed, 0xdc, 0x36, 0xd7, 0x32, 0x21, 0xa4, 0xd3,
|
|
0xaa, 0x0d, 0x41, 0xad, 0x45, 0x8b, 0x10, 0xaa, 0x60, 0xd1, 0x16, 0x84, 0x2a, 0xb1, 0x80, 0xf0,
|
|
0xb3, 0x28, 0xab, 0x89, 0x33, 0x0a, 0x43, 0x13, 0xdb, 0xf5, 0x8c, 0x13, 0x50, 0x94, 0x0d, 0x3c,
|
|
0x02, 0x5b, 0x1e, 0x88, 0x25, 0x12, 0x2f, 0x80, 0x2a, 0x1e, 0x04, 0x79, 0x3c, 0xe3, 0x38, 0x4e,
|
|
0x8a, 0x58, 0xd9, 0xe7, 0x67, 0xce, 0xf7, 0x9d, 0x6f, 0xce, 0xb1, 0xa1, 0xca, 0x69, 0x30, 0xa0,
|
|
0x81, 0x4d, 0x1c, 0xc7, 0x0b, 0x5d, 0xa1, 0x9f, 0xfb, 0x7e, 0xe0, 0x09, 0x0f, 0x2d, 0x29, 0xd3,
|
|
0xaa, 0x76, 0x3d, 0xaf, 0xdb, 0xa3, 0x36, 0xf1, 0x99, 0x4d, 0x5c, 0xd7, 0x13, 0x44, 0x30, 0xcf,
|
|
0xe5, 0x71, 0x1a, 0x1e, 0xc2, 0xc6, 0x6b, 0xbf, 0x43, 0x04, 0x7d, 0x4e, 0x38, 0x1f, 0x7a, 0x41,
|
|
0xa7, 0x45, 0x2f, 0x43, 0xca, 0x05, 0xaa, 0x43, 0xd1, 0xa5, 0x43, 0xed, 0x35, 0x8d, 0xba, 0xd1,
|
|
0x58, 0x69, 0xa5, 0x5d, 0xa8, 0x01, 0xab, 0x4e, 0x18, 0x04, 0xd4, 0x15, 0x49, 0x56, 0x4e, 0x66,
|
|
0x65, 0xdd, 0x08, 0xc1, 0x82, 0x4b, 0xfa, 0xd4, 0xcc, 0xcb, 0xb0, 0x7c, 0xc7, 0x26, 0x54, 0xb2,
|
|
0xc0, 0xdc, 0xf7, 0x5c, 0x4e, 0xb1, 0x03, 0xc5, 0x53, 0xe2, 0x9e, 0x69, 0x22, 0x16, 0x2c, 0x07,
|
|
0x94, 0x7b, 0x61, 0xe0, 0x50, 0xc5, 0x22, 0xb1, 0x51, 0x05, 0x16, 0x89, 0x13, 0xb5, 0xa3, 0x90,
|
|
0x95, 0x15, 0x91, 0xe7, 0x61, 0x3b, 0x39, 0x16, 0xe3, 0xa6, 0x5d, 0x78, 0x1b, 0x4a, 0x31, 0x48,
|
|
0x0c, 0x8a, 0xd6, 0xa1, 0x30, 0x20, 0xbd, 0x50, 0x43, 0xc4, 0x06, 0xde, 0x85, 0xb5, 0xa7, 0x54,
|
|
0x1c, 0xc7, 0x4a, 0x6a, 0x42, 0xba, 0x1b, 0x23, 0xd5, 0xcd, 0x67, 0x03, 0x96, 0x54, 0xda, 0xbc,
|
|
0x38, 0x32, 0x61, 0x89, 0xba, 0xa4, 0xdd, 0xa3, 0xb1, 0x46, 0xcb, 0x2d, 0x6d, 0x22, 0x0c, 0x25,
|
|
0x87, 0xf8, 0xa4, 0xcd, 0x7a, 0x4c, 0x30, 0xca, 0xcd, 0x7c, 0x3d, 0xdf, 0x58, 0x69, 0x4d, 0xf9,
|
|
0xd0, 0x0e, 0x2c, 0x0a, 0xef, 0x82, 0xba, 0xdc, 0x5c, 0xa8, 0xe7, 0x1b, 0xc5, 0x83, 0xf2, 0xbe,
|
|
0xbe, 0xeb, 0x57, 0x91, 0xbb, 0xa5, 0xa2, 0xf8, 0x3e, 0x94, 0x14, 0x09, 0xfe, 0x8c, 0x71, 0x81,
|
|
0x76, 0xa0, 0xc0, 0x04, 0xed, 0x73, 0xd3, 0x90, 0xc7, 0xfe, 0x4d, 0x8e, 0xe9, 0x8e, 0xe2, 0x30,
|
|
0x7e, 0x01, 0x05, 0x59, 0x08, 0x95, 0x21, 0xc7, 0xf4, 0x5d, 0xe7, 0x58, 0x27, 0xd2, 0x9e, 0x71,
|
|
0x1e, 0xd2, 0xce, 0xb1, 0x90, 0xbc, 0xf3, 0xad, 0xc4, 0x46, 0x55, 0x58, 0xa1, 0x1f, 0x7c, 0x16,
|
|
0x50, 0x7e, 0x2c, 0xa4, 0xc2, 0xf9, 0xd6, 0xc4, 0x81, 0x0f, 0x00, 0x64, 0xc9, 0x98, 0xc8, 0xf6,
|
|
0x34, 0x91, 0x2c, 0x7f, 0x45, 0xe3, 0x0d, 0xa0, 0xd3, 0x80, 0x12, 0x41, 0x63, 0xef, 0xf5, 0x72,
|
|
0xa7, 0xb0, 0xcf, 0x5c, 0x45, 0x6c, 0xe2, 0x50, 0x5d, 0xe4, 0x75, 0x17, 0xf8, 0x0e, 0xfc, 0x37,
|
|
0x55, 0x77, 0x72, 0xe5, 0x52, 0x37, 0x7d, 0xe5, 0xd2, 0xc0, 0x0f, 0x00, 0x3d, 0xa6, 0x3d, 0xfa,
|
|
0x17, 0x24, 0x62, 0x98, 0x5c, 0x02, 0xb3, 0x0e, 0x28, 0x6a, 0x76, 0x7a, 0x5a, 0xf0, 0x2a, 0xfc,
|
|
0xf3, 0xa4, 0xef, 0x8b, 0x8f, 0x1a, 0xf6, 0xe0, 0x6b, 0x01, 0xca, 0x2a, 0xe7, 0x25, 0x0d, 0x06,
|
|
0xcc, 0xa1, 0x68, 0x08, 0x0b, 0xd1, 0x30, 0xa2, 0xf5, 0x44, 0x97, 0xd4, 0x02, 0x58, 0x1b, 0x19,
|
|
0xaf, 0x5a, 0x93, 0x93, 0x4f, 0x3f, 0x7e, 0x7d, 0xc9, 0x3d, 0x44, 0x47, 0x72, 0xb3, 0x07, 0x77,
|
|
0x93, 0xef, 0x80, 0x43, 0xdc, 0x3d, 0x66, 0x8f, 0xf4, 0xa8, 0x8f, 0xed, 0x51, 0xbc, 0x15, 0x63,
|
|
0x7b, 0x94, 0xda, 0x80, 0x47, 0xcd, 0xe6, 0x18, 0x0d, 0xa0, 0x3c, 0xbd, 0x84, 0xa8, 0x96, 0x80,
|
|
0xcd, 0xfd, 0x2c, 0x58, 0xb7, 0xae, 0x8d, 0x2b, 0x5a, 0x5b, 0x92, 0xd6, 0x4d, 0xcb, 0xcc, 0xd2,
|
|
0xf2, 0x55, 0xe6, 0x91, 0xd1, 0x44, 0x6f, 0xa1, 0x94, 0x92, 0x8a, 0xa3, 0x1b, 0x49, 0xd5, 0x59,
|
|
0x05, 0x53, 0xfd, 0xa7, 0x87, 0x1b, 0xff, 0x2f, 0x81, 0xd6, 0xd0, 0x6a, 0x06, 0x08, 0x9d, 0x03,
|
|
0x4c, 0x96, 0x16, 0x59, 0xc9, 0xe9, 0x99, 0x4d, 0xb6, 0x66, 0x16, 0x02, 0xd7, 0x64, 0x51, 0x13,
|
|
0x55, 0xb2, 0xec, 0x47, 0xd1, 0x95, 0x8f, 0xd1, 0x25, 0x14, 0x53, 0xa3, 0x94, 0xe2, 0x3d, 0x3b,
|
|
0xb8, 0x56, 0x75, 0x7e, 0x50, 0xe9, 0xb4, 0x2b, 0x91, 0x36, 0x71, 0x75, 0x3e, 0x92, 0x2d, 0xa7,
|
|
0x31, 0xd2, 0xaa, 0x0f, 0xc5, 0xd4, 0x40, 0xa6, 0x20, 0x67, 0xc7, 0xd4, 0xaa, 0x24, 0xc1, 0xa9,
|
|
0x99, 0xc3, 0xb7, 0x25, 0xd8, 0x56, 0x73, 0xf3, 0x4f, 0x60, 0xf6, 0x88, 0x75, 0xc6, 0x27, 0x27,
|
|
0xdf, 0xae, 0x6a, 0xc6, 0xf7, 0xab, 0x9a, 0xf1, 0xf3, 0xaa, 0x66, 0x9c, 0xdf, 0xeb, 0x32, 0xf1,
|
|
0x2e, 0x6c, 0xef, 0x3b, 0x5e, 0xdf, 0x26, 0x41, 0xd7, 0xf3, 0x03, 0xef, 0xbd, 0x7c, 0xd9, 0x73,
|
|
0x3a, 0xf6, 0xe0, 0xd0, 0xf6, 0x2f, 0xba, 0x51, 0x49, 0xa7, 0xc7, 0xe8, 0xe4, 0x0f, 0xd4, 0x5e,
|
|
0x94, 0xff, 0x96, 0xc3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x18, 0x8a, 0x2b, 0x33, 0xa2, 0x06,
|
|
0x00, 0x00,
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// AccountServiceClient is the client API for AccountService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type AccountServiceClient interface {
|
|
// CanI checks if the current account has permission to perform an action
|
|
CanI(ctx context.Context, in *CanIRequest, opts ...grpc.CallOption) (*CanIResponse, error)
|
|
// UpdatePassword updates an account's password to a new value
|
|
UpdatePassword(ctx context.Context, in *UpdatePasswordRequest, opts ...grpc.CallOption) (*UpdatePasswordResponse, error)
|
|
// ListAccounts returns the list of accounts
|
|
ListAccounts(ctx context.Context, in *ListAccountRequest, opts ...grpc.CallOption) (*AccountsList, error)
|
|
// GetAccount returns an account
|
|
GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*Account, error)
|
|
// CreateToken creates a token
|
|
CreateToken(ctx context.Context, in *CreateTokenRequest, opts ...grpc.CallOption) (*CreateTokenResponse, error)
|
|
// DeleteToken deletes a token
|
|
DeleteToken(ctx context.Context, in *DeleteTokenRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
|
|
}
|
|
|
|
type accountServiceClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewAccountServiceClient(cc *grpc.ClientConn) AccountServiceClient {
|
|
return &accountServiceClient{cc}
|
|
}
|
|
|
|
func (c *accountServiceClient) CanI(ctx context.Context, in *CanIRequest, opts ...grpc.CallOption) (*CanIResponse, error) {
|
|
out := new(CanIResponse)
|
|
err := c.cc.Invoke(ctx, "/account.AccountService/CanI", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountServiceClient) UpdatePassword(ctx context.Context, in *UpdatePasswordRequest, opts ...grpc.CallOption) (*UpdatePasswordResponse, error) {
|
|
out := new(UpdatePasswordResponse)
|
|
err := c.cc.Invoke(ctx, "/account.AccountService/UpdatePassword", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountServiceClient) ListAccounts(ctx context.Context, in *ListAccountRequest, opts ...grpc.CallOption) (*AccountsList, error) {
|
|
out := new(AccountsList)
|
|
err := c.cc.Invoke(ctx, "/account.AccountService/ListAccounts", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountServiceClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*Account, error) {
|
|
out := new(Account)
|
|
err := c.cc.Invoke(ctx, "/account.AccountService/GetAccount", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountServiceClient) CreateToken(ctx context.Context, in *CreateTokenRequest, opts ...grpc.CallOption) (*CreateTokenResponse, error) {
|
|
out := new(CreateTokenResponse)
|
|
err := c.cc.Invoke(ctx, "/account.AccountService/CreateToken", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *accountServiceClient) DeleteToken(ctx context.Context, in *DeleteTokenRequest, opts ...grpc.CallOption) (*EmptyResponse, error) {
|
|
out := new(EmptyResponse)
|
|
err := c.cc.Invoke(ctx, "/account.AccountService/DeleteToken", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// AccountServiceServer is the server API for AccountService service.
|
|
type AccountServiceServer interface {
|
|
// CanI checks if the current account has permission to perform an action
|
|
CanI(context.Context, *CanIRequest) (*CanIResponse, error)
|
|
// UpdatePassword updates an account's password to a new value
|
|
UpdatePassword(context.Context, *UpdatePasswordRequest) (*UpdatePasswordResponse, error)
|
|
// ListAccounts returns the list of accounts
|
|
ListAccounts(context.Context, *ListAccountRequest) (*AccountsList, error)
|
|
// GetAccount returns an account
|
|
GetAccount(context.Context, *GetAccountRequest) (*Account, error)
|
|
// CreateToken creates a token
|
|
CreateToken(context.Context, *CreateTokenRequest) (*CreateTokenResponse, error)
|
|
// DeleteToken deletes a token
|
|
DeleteToken(context.Context, *DeleteTokenRequest) (*EmptyResponse, error)
|
|
}
|
|
|
|
// UnimplementedAccountServiceServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedAccountServiceServer struct {
|
|
}
|
|
|
|
func (*UnimplementedAccountServiceServer) CanI(ctx context.Context, req *CanIRequest) (*CanIResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CanI not implemented")
|
|
}
|
|
func (*UnimplementedAccountServiceServer) UpdatePassword(ctx context.Context, req *UpdatePasswordRequest) (*UpdatePasswordResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdatePassword not implemented")
|
|
}
|
|
func (*UnimplementedAccountServiceServer) ListAccounts(ctx context.Context, req *ListAccountRequest) (*AccountsList, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListAccounts not implemented")
|
|
}
|
|
func (*UnimplementedAccountServiceServer) GetAccount(ctx context.Context, req *GetAccountRequest) (*Account, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented")
|
|
}
|
|
func (*UnimplementedAccountServiceServer) CreateToken(ctx context.Context, req *CreateTokenRequest) (*CreateTokenResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CreateToken not implemented")
|
|
}
|
|
func (*UnimplementedAccountServiceServer) DeleteToken(ctx context.Context, req *DeleteTokenRequest) (*EmptyResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteToken not implemented")
|
|
}
|
|
|
|
func RegisterAccountServiceServer(s *grpc.Server, srv AccountServiceServer) {
|
|
s.RegisterService(&_AccountService_serviceDesc, srv)
|
|
}
|
|
|
|
func _AccountService_CanI_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CanIRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountServiceServer).CanI(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/account.AccountService/CanI",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountServiceServer).CanI(ctx, req.(*CanIRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AccountService_UpdatePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdatePasswordRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountServiceServer).UpdatePassword(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/account.AccountService/UpdatePassword",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountServiceServer).UpdatePassword(ctx, req.(*UpdatePasswordRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AccountService_ListAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListAccountRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountServiceServer).ListAccounts(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/account.AccountService/ListAccounts",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountServiceServer).ListAccounts(ctx, req.(*ListAccountRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AccountService_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetAccountRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountServiceServer).GetAccount(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/account.AccountService/GetAccount",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountServiceServer).GetAccount(ctx, req.(*GetAccountRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AccountService_CreateToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateTokenRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountServiceServer).CreateToken(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/account.AccountService/CreateToken",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountServiceServer).CreateToken(ctx, req.(*CreateTokenRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AccountService_DeleteToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteTokenRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AccountServiceServer).DeleteToken(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/account.AccountService/DeleteToken",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AccountServiceServer).DeleteToken(ctx, req.(*DeleteTokenRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _AccountService_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "account.AccountService",
|
|
HandlerType: (*AccountServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "CanI",
|
|
Handler: _AccountService_CanI_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdatePassword",
|
|
Handler: _AccountService_UpdatePassword_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListAccounts",
|
|
Handler: _AccountService_ListAccounts_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetAccount",
|
|
Handler: _AccountService_GetAccount_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateToken",
|
|
Handler: _AccountService_CreateToken_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteToken",
|
|
Handler: _AccountService_DeleteToken_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "server/account/account.proto",
|
|
}
|
|
|
|
func (m *UpdatePasswordRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *UpdatePasswordRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *UpdatePasswordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Name) > 0 {
|
|
i -= len(m.Name)
|
|
copy(dAtA[i:], m.Name)
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.Name)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.CurrentPassword) > 0 {
|
|
i -= len(m.CurrentPassword)
|
|
copy(dAtA[i:], m.CurrentPassword)
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.CurrentPassword)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.NewPassword) > 0 {
|
|
i -= len(m.NewPassword)
|
|
copy(dAtA[i:], m.NewPassword)
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.NewPassword)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *UpdatePasswordResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *UpdatePasswordResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *UpdatePasswordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *CanIRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *CanIRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *CanIRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Subresource) > 0 {
|
|
i -= len(m.Subresource)
|
|
copy(dAtA[i:], m.Subresource)
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.Subresource)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.Action) > 0 {
|
|
i -= len(m.Action)
|
|
copy(dAtA[i:], m.Action)
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.Action)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Resource) > 0 {
|
|
i -= len(m.Resource)
|
|
copy(dAtA[i:], m.Resource)
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.Resource)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *CanIResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *CanIResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *CanIResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Value) > 0 {
|
|
i -= len(m.Value)
|
|
copy(dAtA[i:], m.Value)
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.Value)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *GetAccountRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *GetAccountRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *GetAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Name) > 0 {
|
|
i -= len(m.Name)
|
|
copy(dAtA[i:], m.Name)
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.Name)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Account) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Account) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Tokens) > 0 {
|
|
for iNdEx := len(m.Tokens) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Tokens[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintAccount(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
}
|
|
if len(m.Capabilities) > 0 {
|
|
for iNdEx := len(m.Capabilities) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.Capabilities[iNdEx])
|
|
copy(dAtA[i:], m.Capabilities[iNdEx])
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.Capabilities[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
}
|
|
if m.Enabled {
|
|
i--
|
|
if m.Enabled {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if len(m.Name) > 0 {
|
|
i -= len(m.Name)
|
|
copy(dAtA[i:], m.Name)
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.Name)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *AccountsList) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *AccountsList) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *AccountsList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Items) > 0 {
|
|
for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintAccount(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Token) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Token) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.ExpiresAt != 0 {
|
|
i = encodeVarintAccount(dAtA, i, uint64(m.ExpiresAt))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if m.IssuedAt != 0 {
|
|
i = encodeVarintAccount(dAtA, i, uint64(m.IssuedAt))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if len(m.Id) > 0 {
|
|
i -= len(m.Id)
|
|
copy(dAtA[i:], m.Id)
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.Id)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *TokensList) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *TokensList) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *TokensList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Items) > 0 {
|
|
for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintAccount(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *CreateTokenRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *CreateTokenRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *CreateTokenRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Id) > 0 {
|
|
i -= len(m.Id)
|
|
copy(dAtA[i:], m.Id)
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.Id)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if m.ExpiresIn != 0 {
|
|
i = encodeVarintAccount(dAtA, i, uint64(m.ExpiresIn))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if len(m.Name) > 0 {
|
|
i -= len(m.Name)
|
|
copy(dAtA[i:], m.Name)
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.Name)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *CreateTokenResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *CreateTokenResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *CreateTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Token) > 0 {
|
|
i -= len(m.Token)
|
|
copy(dAtA[i:], m.Token)
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.Token)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *DeleteTokenRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *DeleteTokenRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *DeleteTokenRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Id) > 0 {
|
|
i -= len(m.Id)
|
|
copy(dAtA[i:], m.Id)
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.Id)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(m.Name) > 0 {
|
|
i -= len(m.Name)
|
|
copy(dAtA[i:], m.Name)
|
|
i = encodeVarintAccount(dAtA, i, uint64(len(m.Name)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ListAccountRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ListAccountRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ListAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *EmptyResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *EmptyResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *EmptyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintAccount(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovAccount(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *UpdatePasswordRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.NewPassword)
|
|
if l > 0 {
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
l = len(m.CurrentPassword)
|
|
if l > 0 {
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *UpdatePasswordResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *CanIRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Resource)
|
|
if l > 0 {
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
l = len(m.Action)
|
|
if l > 0 {
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
l = len(m.Subresource)
|
|
if l > 0 {
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *CanIResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Value)
|
|
if l > 0 {
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetAccountRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Account) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
if m.Enabled {
|
|
n += 2
|
|
}
|
|
if len(m.Capabilities) > 0 {
|
|
for _, s := range m.Capabilities {
|
|
l = len(s)
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
}
|
|
if len(m.Tokens) > 0 {
|
|
for _, e := range m.Tokens {
|
|
l = e.Size()
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *AccountsList) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Items) > 0 {
|
|
for _, e := range m.Items {
|
|
l = e.Size()
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Token) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Id)
|
|
if l > 0 {
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
if m.IssuedAt != 0 {
|
|
n += 1 + sovAccount(uint64(m.IssuedAt))
|
|
}
|
|
if m.ExpiresAt != 0 {
|
|
n += 1 + sovAccount(uint64(m.ExpiresAt))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *TokensList) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Items) > 0 {
|
|
for _, e := range m.Items {
|
|
l = e.Size()
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *CreateTokenRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
if m.ExpiresIn != 0 {
|
|
n += 1 + sovAccount(uint64(m.ExpiresIn))
|
|
}
|
|
l = len(m.Id)
|
|
if l > 0 {
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *CreateTokenResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Token)
|
|
if l > 0 {
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *DeleteTokenRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
l = len(m.Id)
|
|
if l > 0 {
|
|
n += 1 + l + sovAccount(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ListAccountRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *EmptyResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovAccount(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozAccount(x uint64) (n int) {
|
|
return sovAccount(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *UpdatePasswordRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: UpdatePasswordRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: UpdatePasswordRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NewPassword", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.NewPassword = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field CurrentPassword", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.CurrentPassword = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAccount(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *UpdatePasswordResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: UpdatePasswordResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: UpdatePasswordResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAccount(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *CanIRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: CanIRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: CanIRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Resource = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Action = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Subresource", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Subresource = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAccount(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *CanIResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: CanIResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: CanIResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Value = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAccount(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetAccountRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: GetAccountRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAccount(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Account) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Account: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Account: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Enabled = bool(v != 0)
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Capabilities = append(m.Capabilities, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Tokens = append(m.Tokens, &Token{})
|
|
if err := m.Tokens[len(m.Tokens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAccount(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *AccountsList) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: AccountsList: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: AccountsList: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Items = append(m.Items, &Account{})
|
|
if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAccount(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Token) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Token: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Token: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Id = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field IssuedAt", wireType)
|
|
}
|
|
m.IssuedAt = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.IssuedAt |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType)
|
|
}
|
|
m.ExpiresAt = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.ExpiresAt |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAccount(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *TokensList) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: TokensList: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: TokensList: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Items = append(m.Items, &Token{})
|
|
if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAccount(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *CreateTokenRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: CreateTokenRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: CreateTokenRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ExpiresIn", wireType)
|
|
}
|
|
m.ExpiresIn = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.ExpiresIn |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Id = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAccount(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *CreateTokenResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: CreateTokenResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: CreateTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Token = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAccount(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *DeleteTokenRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: DeleteTokenRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: DeleteTokenRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Id = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAccount(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ListAccountRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: ListAccountRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ListAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAccount(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *EmptyResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: EmptyResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: EmptyResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipAccount(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthAccount
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipAccount(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
depth := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 1:
|
|
iNdEx += 8
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowAccount
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthAccount
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupAccount
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthAccount
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthAccount = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowAccount = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group")
|
|
)
|