...
1 package scimschema
2
3 type Type int
4
5 const (
6 Unsupported Type = iota
7 Schemas
8 API
9 Param
10 )
11
12 func (t Type) String() string {
13 switch t {
14 case Schemas:
15 return "schemas"
16 case API:
17 return "api"
18 case Param:
19 return "param"
20 }
21
22 return ""
23 }
24
25 func TypeFromString(input string) Type {
26 switch input {
27 case "schemas":
28 return Schemas
29 case "api":
30 return API
31 case "param":
32 return Param
33 }
34
35 return Unsupported
36 }
37
View as plain text