Merge pull request #265 from quexten/fix/camelcase-requests
Force camelcase on requests
This commit is contained in:
commit
f38fd2edec
|
@ -8,76 +8,76 @@ import (
|
|||
)
|
||||
|
||||
type SyncData struct {
|
||||
Profile Profile
|
||||
Folders []Folder
|
||||
Ciphers []Cipher
|
||||
Profile Profile `json:"profile"`
|
||||
Folders []Folder `json:"folders"`
|
||||
Ciphers []Cipher `json:"ciphers"`
|
||||
}
|
||||
|
||||
type Organization struct {
|
||||
Object string
|
||||
Id uuid.UUID
|
||||
Name string
|
||||
UseGroups bool
|
||||
UseDirectory bool
|
||||
UseEvents bool
|
||||
UseTotp bool
|
||||
Use2fa bool
|
||||
UseApi bool
|
||||
UsersGetPremium bool
|
||||
SelfHost bool
|
||||
Seats int
|
||||
MaxCollections int
|
||||
MaxStorageGb int
|
||||
Key string
|
||||
Status int
|
||||
Type int
|
||||
Enabled bool
|
||||
Object string `json:"object"`
|
||||
Id uuid.UUID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
UseGroups bool `json:"useGroups"`
|
||||
UseDirectory bool `json:"useDirectory"`
|
||||
UseEvents bool `json:"useEvents"`
|
||||
UseTotp bool `json:"useTotp"`
|
||||
Use2fa bool `json:"use2fa"`
|
||||
UseApi bool `json:"useApi"`
|
||||
UsersGetPremium bool `json:"usersGetPremium"`
|
||||
SelfHost bool `json:"selfHost"`
|
||||
Seats int `json:"seats"`
|
||||
MaxCollections int `json:"maxCollections"`
|
||||
MaxStorageGb int `json:"maxStorageGb"`
|
||||
Key string `json:"key"`
|
||||
Status int `json:"status"`
|
||||
Type int `json:"type"`
|
||||
Enabled bool `json:"enabled"`
|
||||
}
|
||||
|
||||
type Profile struct {
|
||||
ID uuid.UUID
|
||||
Name string
|
||||
Email string
|
||||
EmailVerified bool
|
||||
Premium bool
|
||||
MasterPasswordHint string
|
||||
Culture string
|
||||
TwoFactorEnabled bool
|
||||
Key crypto.EncString
|
||||
PrivateKey crypto.EncString
|
||||
SecurityStamp string
|
||||
Organizations []Organization
|
||||
ID uuid.UUID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
EmailVerified bool `json:"emailVerified"`
|
||||
Premium bool `json:"premium"`
|
||||
MasterPasswordHint string `json:"masterPasswordHint"`
|
||||
Culture string `json:"culture"`
|
||||
TwoFactorEnabled bool `json:"twoFactorEnabled"`
|
||||
Key crypto.EncString `json:"key"`
|
||||
PrivateKey crypto.EncString `json:"privateKey"`
|
||||
SecurityStamp string `json:"securityStamp"`
|
||||
Organizations []Organization `json:"organizations"`
|
||||
}
|
||||
|
||||
type Folder struct {
|
||||
ID uuid.UUID
|
||||
Name string
|
||||
RevisionDate time.Time
|
||||
ID uuid.UUID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
RevisionDate time.Time `json:"revisionDate"`
|
||||
}
|
||||
|
||||
type Cipher struct {
|
||||
Type CipherType
|
||||
ID *uuid.UUID `json:",omitempty"`
|
||||
Name crypto.EncString
|
||||
Edit bool
|
||||
RevisionDate time.Time
|
||||
DeletedDate time.Time
|
||||
Type CipherType `json:"type,omitempty"`
|
||||
ID *uuid.UUID `json:"id,omitempty"`
|
||||
Name crypto.EncString `json:"name,omitempty"`
|
||||
Edit bool `json:"edit,omitempty"`
|
||||
RevisionDate time.Time `json:"revisionDate,omitempty"`
|
||||
DeletedDate time.Time `json:"deletedDate,omitempty"`
|
||||
|
||||
FolderID *uuid.UUID `json:",omitempty"`
|
||||
OrganizationID *uuid.UUID `json:",omitempty"`
|
||||
Favorite bool `json:",omitempty"`
|
||||
Attachments interface{} `json:",omitempty"`
|
||||
OrganizationUseTotp bool `json:",omitempty"`
|
||||
CollectionIDs []string `json:",omitempty"`
|
||||
Fields []Field `json:",omitempty"`
|
||||
FolderID *uuid.UUID `json:"folderId,omitempty"`
|
||||
OrganizationID *uuid.UUID `json:"organizationId,omitempty"`
|
||||
Favorite bool `json:"favorite,omitempty"`
|
||||
Attachments interface{} `json:"attachments,omitempty"`
|
||||
OrganizationUseTotp bool `json:"organizationUseTotp,omitempty"`
|
||||
CollectionIDs []string `json:"collectionIds,omitempty"`
|
||||
Fields []Field `json:"fields,omitempty"`
|
||||
|
||||
Card *Card `json:",omitempty"`
|
||||
Identity *Identity `json:",omitempty"`
|
||||
Login *LoginCipher `json:",omitempty"`
|
||||
Notes *crypto.EncString `json:",omitempty"`
|
||||
SecureNote *SecureNoteCipher `json:",omitempty"`
|
||||
|
||||
Key *crypto.EncString `json:",omitempty"`
|
||||
Card *Card `json:"card,omitempty"`
|
||||
Identity *Identity `json:"identity,omitempty"`
|
||||
Login *LoginCipher `json:"login,omitempty"`
|
||||
Notes *crypto.EncString `json:"notes,omitempty"`
|
||||
SecureNote *SecureNoteCipher `json:"secureNote,omitempty"`
|
||||
|
||||
Key *crypto.EncString `json:"key,omitempty"`
|
||||
}
|
||||
|
||||
type CipherType int
|
||||
|
@ -91,56 +91,56 @@ const (
|
|||
)
|
||||
|
||||
type Card struct {
|
||||
CardholderName crypto.EncString
|
||||
Brand crypto.EncString
|
||||
Number crypto.EncString
|
||||
ExpMonth crypto.EncString
|
||||
ExpYear crypto.EncString
|
||||
Code crypto.EncString
|
||||
CardholderName crypto.EncString `json:"cardholderName"`
|
||||
Brand crypto.EncString `json:"brand"`
|
||||
Number crypto.EncString `json:"number"`
|
||||
ExpMonth crypto.EncString `json:"expMonth"`
|
||||
ExpYear crypto.EncString `json:"expYear"`
|
||||
Code crypto.EncString `json:"code"`
|
||||
}
|
||||
|
||||
type Identity struct {
|
||||
Title crypto.EncString
|
||||
FirstName crypto.EncString
|
||||
MiddleName crypto.EncString
|
||||
LastName crypto.EncString
|
||||
Title crypto.EncString `json:"title"`
|
||||
FirstName crypto.EncString `json:"firstName"`
|
||||
MiddleName crypto.EncString `json:"middleName"`
|
||||
LastName crypto.EncString `json:"lastName"`
|
||||
|
||||
Username crypto.EncString
|
||||
Company crypto.EncString
|
||||
SSN crypto.EncString
|
||||
PassportNumber crypto.EncString
|
||||
LicenseNumber crypto.EncString
|
||||
Username crypto.EncString `json:"username"`
|
||||
Company crypto.EncString `json:"company"`
|
||||
SSN crypto.EncString `json:"ssn"`
|
||||
PassportNumber crypto.EncString `json:"passportNumber"`
|
||||
LicenseNumber crypto.EncString `json:"licenseNumber"`
|
||||
|
||||
Email crypto.EncString
|
||||
Phone crypto.EncString
|
||||
Address1 crypto.EncString
|
||||
Address2 crypto.EncString
|
||||
Address3 crypto.EncString
|
||||
City crypto.EncString
|
||||
State crypto.EncString
|
||||
PostalCode crypto.EncString
|
||||
Country crypto.EncString
|
||||
Email crypto.EncString `json:"email"`
|
||||
Phone crypto.EncString `json:"phone"`
|
||||
Address1 crypto.EncString `json:"address1"`
|
||||
Address2 crypto.EncString `json:"address2"`
|
||||
Address3 crypto.EncString `json:"address3"`
|
||||
City crypto.EncString `json:"city"`
|
||||
State crypto.EncString `json:"state"`
|
||||
PostalCode crypto.EncString `json:"postalCode"`
|
||||
Country crypto.EncString `json:"country"`
|
||||
}
|
||||
|
||||
type FieldType int
|
||||
type Field struct {
|
||||
Type FieldType
|
||||
Name crypto.EncString
|
||||
Value crypto.EncString
|
||||
Type FieldType `json:"type,omitempty"`
|
||||
Name crypto.EncString `json:"name,omitempty"`
|
||||
Value crypto.EncString `json:"value,omitempty"`
|
||||
}
|
||||
|
||||
type LoginCipher struct {
|
||||
Password crypto.EncString
|
||||
URI crypto.EncString
|
||||
URIs []URI
|
||||
Username crypto.EncString `json:",omitempty"`
|
||||
Totp crypto.EncString `json:",omitempty"`
|
||||
Password crypto.EncString `json:"password,omitempty"`
|
||||
URI crypto.EncString `json:"uri,omitempty"`
|
||||
URIs []URI `json:"uris,omitempty"`
|
||||
Username crypto.EncString `json:"username,omitempty"`
|
||||
Totp crypto.EncString `json:"totp,omitempty"`
|
||||
}
|
||||
|
||||
type URIMatch int
|
||||
type URI struct {
|
||||
URI string
|
||||
Match URIMatch
|
||||
URI string `json:"uri,omitempty"`
|
||||
Match URIMatch `json:"match,omitempty"`
|
||||
}
|
||||
|
||||
type SecureNoteType int
|
||||
|
|
Loading…
Reference in New Issue