{"modulePath":"github.com/UnityTech/client-go","version":"v2.0.0+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package intstr\n\nPackage intstr is a generated protocol buffer package.\n\nIt is generated from these files:\n\n\tk8s.io/kubernetes/pkg/util/intstr/generated.proto\n\nIt has these top-level messages:\n\n\tIntOrString\n\n## Variables\n\n```go\nvar (\n\tErrInvalidLengthGenerated = fmt.Errorf(\"proto: negative length found during unmarshaling\")\n\tErrIntOverflowGenerated   = fmt.Errorf(\"proto: integer overflow\")\n)\n```\n\n## Functions\n\n```go\nfunc GetValueFromIntOrPercent(intOrPercent *IntOrString, total int, roundUp bool) (int, error)\n```\n\n## Types\n\n```go\ntype IntOrString struct {\n\tType   Type   `protobuf:\"varint,1,opt,name=type,casttype=Type\"`\n\tIntVal int32  `protobuf:\"varint,2,opt,name=intVal\"`\n\tStrVal string `protobuf:\"bytes,3,opt,name=strVal\"`\n}\n```\nIntOrString is a type that can hold an int32 or a string.  When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type.  This allows you to have, for example, a JSON field that can accept a name or number. TODO: Rename to Int32OrString\n\n\\+protobuf=true +protobuf.options.(gogoproto.goproto\\_stringer)=false +k8s:openapi-gen=true\n\n```go\nfunc FromInt(val int) IntOrString\n```\nFromInt creates an IntOrString object with an int32 value. It is your responsibility not to call this method with a value greater than int32. TODO: convert to (val int32)\n\n```go\nfunc FromString(val string) IntOrString\n```\nFromString creates an IntOrString object with a string value.\n\n```go\nfunc (*IntOrString) Descriptor() ([]byte, []int)\n```\n\n```go\nfunc (intstr *IntOrString) Fuzz(c fuzz.Continue)\n```\n\n```go\nfunc (intstr *IntOrString) IntValue() int\n```\nIntValue returns the IntVal if type Int, or if it is a String, will attempt a conversion to int.\n\n```go\nfunc (m *IntOrString) Marshal() (data []byte, err error)\n```\n\n```go\nfunc (intstr IntOrString) MarshalJSON() ([]byte, error)\n```\nMarshalJSON implements the json.Marshaller interface.\n\n```go\nfunc (m *IntOrString) MarshalTo(data []byte) (int, error)\n```\n\n```go\nfunc (_ IntOrString) OpenAPIDefinition() common.OpenAPIDefinition\n```\n\n```go\nfunc (*IntOrString) ProtoMessage()\n```\n\n```go\nfunc (m *IntOrString) Reset()\n```\n\n```go\nfunc (m *IntOrString) Size() (n int)\n```\n\n```go\nfunc (intstr *IntOrString) String() string\n```\nString returns the string value, or the Itoa of the int value.\n\n```go\nfunc (m *IntOrString) Unmarshal(data []byte) error\n```\n\n```go\nfunc (intstr *IntOrString) UnmarshalJSON(value []byte) error\n```\nUnmarshalJSON implements the json.Unmarshaller interface.\n\n```go\ntype Type int\n```\nType represents the stored type of IntOrString.\n\n```go\nconst (\n\tInt    Type = iota // The IntOrString holds an int.\n\tString             // The IntOrString holds a string.\n)\n```\n\n","path":"github.com/UnityTech/client-go/pkg/util/intstr","name":"intstr","synopsis":"Package intstr is a generated protocol buffer package.","isRedistributable":true}
