X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fxdsconfig%2Fbuilderconfig.go;h=965e6e785cb93a852f623e1e19684ace6bb02491;hb=5dc2ff003106f0ced38caadb06033f24c792f9b9;hp=6fc18144be71202fa28e320c628b205dbb3b3e0f;hpb=985b32b78da6e5ea008e45f6cf2df140df350ea9;p=src%2Fxds%2Fxds-server.git diff --git a/lib/xdsconfig/builderconfig.go b/lib/xdsconfig/builderconfig.go index 6fc1814..965e6e7 100644 --- a/lib/xdsconfig/builderconfig.go +++ b/lib/xdsconfig/builderconfig.go @@ -1,26 +1,38 @@ +/* + * Copyright (C) 2017-2018 "IoT.bzh" + * Author Sebastien Douheret + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * 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 + * + * Unless 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. + */ + package xdsconfig import ( "errors" "net" -) -// BuilderConfig represents the builder container configuration -type BuilderConfig struct { - IP string `json:"ip"` - Port string `json:"port"` - SyncThingID string `json:"syncThingID"` -} + "gerrit.automotivelinux.org/gerrit/src/xds/xds-server.git/lib/xsapiv1" +) // NewBuilderConfig creates a new BuilderConfig instance -func NewBuilderConfig(stID string) (BuilderConfig, error) { +func NewBuilderConfig(stID string) (xsapiv1.BuilderConfig, error) { // Do we really need it ? may be not accessible from client side ip, err := getLocalIP() if err != nil { - return BuilderConfig{}, err + return xsapiv1.BuilderConfig{}, err } - b := BuilderConfig{ + b := xsapiv1.BuilderConfig{ IP: ip, // TODO currently not used Port: "", // TODO currently not used SyncThingID: stID,