github.com/goharbor/go-client@v0.210.0/pkg/sdk/v2.0/models/statistic.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package models 4 5 // This file was generated by the swagger tool. 6 // Editing this file might prove futile when you re-run the swagger generate command 7 8 import ( 9 "context" 10 11 "github.com/go-openapi/strfmt" 12 "github.com/go-openapi/swag" 13 ) 14 15 // Statistic statistic 16 // 17 // swagger:model Statistic 18 type Statistic struct { 19 20 // The count of the private projects 21 PrivateProjectCount int64 `json:"private_project_count"` 22 23 // The count of the private repositories 24 PrivateRepoCount int64 `json:"private_repo_count"` 25 26 // The count of the public projects 27 PublicProjectCount int64 `json:"public_project_count"` 28 29 // The count of the public repositories 30 PublicRepoCount int64 `json:"public_repo_count"` 31 32 // The count of the total projects, only be seen by the system admin 33 TotalProjectCount int64 `json:"total_project_count"` 34 35 // The count of the total repositories, only be seen by the system admin 36 TotalRepoCount int64 `json:"total_repo_count"` 37 38 // The total storage consumption of blobs, only be seen by the system admin 39 TotalStorageConsumption int64 `json:"total_storage_consumption"` 40 } 41 42 // Validate validates this statistic 43 func (m *Statistic) Validate(formats strfmt.Registry) error { 44 return nil 45 } 46 47 // ContextValidate validates this statistic based on context it is used 48 func (m *Statistic) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 49 return nil 50 } 51 52 // MarshalBinary interface implementation 53 func (m *Statistic) MarshalBinary() ([]byte, error) { 54 if m == nil { 55 return nil, nil 56 } 57 return swag.WriteJSON(m) 58 } 59 60 // UnmarshalBinary interface implementation 61 func (m *Statistic) UnmarshalBinary(b []byte) error { 62 var res Statistic 63 if err := swag.ReadJSON(b, &res); err != nil { 64 return err 65 } 66 *m = res 67 return nil 68 }