File: enum.go

package info (click to toggle)
golang-k8s-kube-openapi 0.0~git20241212.2c72e55-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,396 kB
  • sloc: sh: 50; makefile: 5
file content (25 lines) | stat: -rw-r--r-- 611 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package enumtype

// FruitType defines a kind of fruits.
// +enum
type FruitType string

// FruitApple is the Apple
const FruitApple FruitType = "apple"

// FruitBanana is the Banana
const FruitBanana FruitType = "banana"

// FruitRiceBall is the Rice ball that does not seem to belong to
// a fruits basket but has a long comment that is so long that it spans
// multiple lines
const FruitRiceBall FruitType = "onigiri"

// FruitsBasket is the type that contains the enum type.
// +k8s:openapi-gen=true
type FruitsBasket struct {
	Content FruitType `json:"content"`

	// +default=0
	Count int `json:"count"`
}