-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: format code about exported function should have comment #183
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,10 @@ import ( | |
|
||
// The code below allows to perform complex data section on []api.ConfigMap | ||
|
||
// ConfigMapCell is a cell in the table of configmaps. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ConfigMapCell wraps api.ConfigMap for data selection. |
||
type ConfigMapCell api.ConfigMap | ||
|
||
// GetProperty returns a property. | ||
func (self ConfigMapCell) GetProperty(name dataselect.PropertyName) dataselect.ComparableValue { | ||
switch name { | ||
case dataselect.NameProperty: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,10 @@ import ( | |
|
||
// The code below allows to perform complex data section on []extensions.Ingress | ||
|
||
// IngressCell is a cell in the table of ingress. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. // IngressCell wraps v1.Ingress for data selection. |
||
type IngressCell v1.Ingress | ||
|
||
// GetProperty returns a property. | ||
func (self IngressCell) GetProperty(name dataselect.PropertyName) dataselect.ComparableValue { | ||
switch name { | ||
case dataselect.NameProperty: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ type JobList struct { | |
Errors []error `json:"errors"` | ||
} | ||
|
||
// JobStatusType is a valid value for JobStatus.Status. | ||
type JobStatusType string | ||
|
||
const ( | ||
|
@@ -55,6 +56,7 @@ const ( | |
JobStatusFailed JobStatusType = "Failed" | ||
) | ||
|
||
// JobStatus contains inferred job status based on job conditions | ||
type JobStatus struct { | ||
// Short, machine understandable job status code. | ||
Status JobStatusType `json:"status"` | ||
|
@@ -128,6 +130,7 @@ func GetJobListFromChannels(channels *common.ResourceChannels, dsQuery *datasele | |
return jobList, nil | ||
} | ||
|
||
// ToJobList returns a list of all Jobs in the cluster reading required resource list once from the channel. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what about the following description |
||
func ToJobList(jobs []batch.Job, pods []v1.Pod, events []v1.Event, nonCriticalErrors []error, | ||
dsQuery *dataselect.DataSelectQuery) *JobList { | ||
jobList := &JobList{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,10 @@ import ( | |
"github.com/karmada-io/dashboard/pkg/dataselect" | ||
) | ||
|
||
// NodeCell represents a cell in the table of nodes. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. // NodeCell wraps api.Node for data selection. |
||
type NodeCell api.Node | ||
|
||
// GetProperty returns a property of the cell. | ||
func (self NodeCell) GetProperty(name dataselect.PropertyName) dataselect.ComparableValue { | ||
switch name { | ||
case dataselect.NameProperty: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ type OverridePolicyList struct { | |
Errors []error `json:"errors"` | ||
} | ||
|
||
// OverridePolicy contains information about a single propagation. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
type OverridePolicy struct { | ||
ObjectMeta types.ObjectMeta `json:"objectMeta"` | ||
TypeMeta types.TypeMeta `json:"typeMeta"` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,10 @@ import ( | |
"github.com/karmada-io/dashboard/pkg/dataselect" | ||
) | ||
|
||
// PodCell is a cell for pod. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. // PodCell wraps api.Pod for data selection. |
||
type PodCell api.Pod | ||
|
||
// GetProperty returns a property. | ||
func (self PodCell) GetProperty(name dataselect.PropertyName) dataselect.ComparableValue { | ||
switch name { | ||
case dataselect.NameProperty: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// HandleSyncOperation handles the sync operation for a specific app, if not specified, it handles the sync operation for all apps