{"modulePath":"github.com/mlrun/controller","version":"v0.0.0-20220829123749-5ec74ad0118c","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package common\n\nCopyright 2019 Iguazio Systems Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\") with an addition restriction as set forth herein. You may not use this file except in compliance with the License. You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0).\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n\nIn addition, you may not use the software for any purposes that are illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction.\n\nCopyright 2019 Iguazio Systems Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\") with an addition restriction as set forth herein. You may not use this file except in compliance with the License. You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0).\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n\nIn addition, you may not use the software for any purposes that are illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction.\n\n## Functions\n\n```go\nfunc FileExists(filename string) bool\n```\n\n```go\nfunc MergeFunctions(one, two *Function)\n```\n\n```go\nfunc MergeMaps(one, two map[string]string)\n```\n\n```go\nfunc MergeRawJson(one *json.RawMessage, two json.RawMessage)\n```\n\n```go\nfunc MergeStrings(one *string, two string)\n```\n\n## Types\n\n```go\ntype Function struct {\n\tKind     string `json:\"kind\"`\n\tMetadata FunctionMeta\n\tSpec     FunctionSpec\n\tStatus   json.RawMessage `json:\"status,omitempty\"`\n}\n```\n\n```go\ntype FunctionMeta struct {\n\tProject     string `json:\"project,omitempty\"`\n\tName        string `json:\"name\"`\n\tTag         string `json:\"tag,omitempty\"`\n\tNamespace   string `json:\"namespace,omitempty\"`\n\tLabels      map[string]string\n\tAnnotations map[string]string\n}\n```\n\n```go\ntype FunctionSpec struct {\n\tCommand     string          `json:\"command,omitempty\"`\n\tImage       string          `json:\"image,omitempty\"`\n\tMode        string          `json:\"mode,omitempty\"`\n\tArgs        []string        `json:\"args,omitempty\"`\n\tDescription string          `json:\"description,omitempty\"`\n\tBuild       ImageBuilder    `json:\"build,omitempty\"`\n\tEnrtyPoints json.RawMessage `json:\"entry_points,omitempty\"`\n\n\tEnv             json.RawMessage `json:\"env,omitempty\"`\n\tVolumes         json.RawMessage `json:\"volumes,omitempty\"`\n\tVolumeMounts    json.RawMessage `json:\"volume_mounts,omitempty\"`\n\tResources       json.RawMessage `json:\"resources,omitempty\"`\n\tReplicas        int             `json:\"replicas,omitempty\"`\n\tImagePullPolicy string          `json:\"image_pull_policy,omitempty\"`\n\tServiceAccount  string          `json:\"service_account,omitempty\"`\n}\n```\n\n```go\ntype ImageBuilder struct {\n\tBaseImage          string   `json:\"base_image,omitempty\"`\n\tFunctionSourceCode []byte   `json:\"functionSourceCode,omitempty\"`\n\tCommands           []string `json:\"commands,omitempty\"`\n\tRegistry           string   `json:\"registry,omitempty\"`\n\tSecret             string   `json:\"secret,omitempty\"`\n\tSource             string   `json:\"source,omitempty\"`\n\tImage              string   `json:\"image,omitempty\"`\n}\n```\n\n","path":"github.com/mlrun/controller/pkg/common","name":"common","synopsis":"","isRedistributable":true}
