代码拉取完成,页面将自动刷新
// Code generated by go-swagger; DO NOT EDIT.
package model
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// GeneralInfo general info
//
// swagger:model GeneralInfo
type GeneralInfo struct {
// The auth mode of current Harbor instance.
AuthMode *string `json:"auth_mode,omitempty"`
// The setting of auth proxy this is only available when Harbor relies on authproxy for authentication.
AuthproxySettings *AuthproxySetting `json:"authproxy_settings,omitempty"`
// The current time of the server.
// Format: date-time
CurrentTime *strfmt.DateTime `json:"current_time,omitempty"`
// The external URL of Harbor, with protocol.
ExternalURL *string `json:"external_url,omitempty"`
// The build version of Harbor.
HarborVersion *string `json:"harbor_version,omitempty"`
// Indicate whether there is a ca root cert file ready for download in the file system.
HasCaRoot *bool `json:"has_ca_root,omitempty"`
// The flag to indicate whether notification mechanism is enabled on Harbor instance.
NotificationEnable *bool `json:"notification_enable,omitempty"`
// Indicate who can create projects, it could be 'adminonly' or 'everyone'.
ProjectCreationRestriction *string `json:"project_creation_restriction,omitempty"`
// The flag to indicate whether Harbor is in readonly mode.
ReadOnly *bool `json:"read_only,omitempty"`
// The storage provider's name of Harbor registry
RegistryStorageProviderName *string `json:"registry_storage_provider_name,omitempty"`
// The url of registry against which the docker command should be issued.
RegistryURL *string `json:"registry_url,omitempty"`
// Indicate whether the Harbor instance enable user to register himself.
SelfRegistration *bool `json:"self_registration,omitempty"`
// If the Harbor instance is deployed with nested chartmuseum.
WithChartmuseum *bool `json:"with_chartmuseum,omitempty"`
// If the Harbor instance is deployed with nested notary.
WithNotary *bool `json:"with_notary,omitempty"`
}
// Validate validates this general info
func (m *GeneralInfo) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAuthproxySettings(formats); err != nil {
res = append(res, err)
}
if err := m.validateCurrentTime(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *GeneralInfo) validateAuthproxySettings(formats strfmt.Registry) error {
if swag.IsZero(m.AuthproxySettings) { // not required
return nil
}
if m.AuthproxySettings != nil {
if err := m.AuthproxySettings.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("authproxy_settings")
}
return err
}
}
return nil
}
func (m *GeneralInfo) validateCurrentTime(formats strfmt.Registry) error {
if swag.IsZero(m.CurrentTime) { // not required
return nil
}
if err := validate.FormatOf("current_time", "body", "date-time", m.CurrentTime.String(), formats); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (m *GeneralInfo) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GeneralInfo) UnmarshalBinary(b []byte) error {
var res GeneralInfo
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。