v / examples / veb_orm_jwt / auth_dto.v
8 lines · 7 sloc · 363 bytes · b474aa0faf8d055aaced80ed0687ac354d0864a0
Raw
1module main
2
3struct AuthRequestDto {
4 // Adding a @[required] attribute will make decoding fail, if that field is not present in the input.
5 // If a field is not [required], but is missing, it will be assumed to have its default value, like 0 for numbers, or '' for strings, and decoding will not fail.
6 username string @[required]
7 password string @[required]
8}
9