Force camelcase on requests

This commit is contained in:
Bernd Schoolmann 2024-07-28 18:05:48 +02:00
parent f7e1cae015
commit c86e32de7e
No known key found for this signature in database
1 changed files with 88 additions and 88 deletions

View File

@ -8,74 +8,74 @@ 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"`
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"`
}
type CipherType int
@ -89,56 +89,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