Fix issues caught by linting

This commit is contained in:
Jesse Suen 2018-02-21 03:23:29 -08:00
parent d7d7821c3e
commit 432e4f46a0
No known key found for this signature in database
GPG key ID: 90C911E8A6106562
13 changed files with 214 additions and 186 deletions

View file

@ -67,7 +67,8 @@ server-image:
.PHONY: lint
lint:
gometalinter --config gometalinter.json ./...
# CGO_ENABLED=0 required due to: # https://github.com/alecthomas/gometalinter/issues/149#issuecomment-351272924
CGO_ENABLED=0 gometalinter.v2 --config gometalinter.json ./...
.PHONY: test
test:

View file

@ -14,13 +14,13 @@ const (
)
var (
// Parts of the image for installation
// These values may be overridden by the link flags during build
imageNamespace = "argoproj"
imageTag = "latest"
// Parts of the image for installation
// These values may be overridden by the link flags during build
//imageNamespace = "argoproj"
//imageTag = "latest"
)
// GetKubeClient creates new kubernetes client config using specified config path and config overrides variables
// GetKubeConfig creates new kubernetes client config using specified config path and config overrides variables
func GetKubeConfig(configPath string, overrides clientcmd.ConfigOverrides) *rest.Config {
loadingRules := clientcmd.NewDefaultClientConfigLoadingRules()
loadingRules.ExplicitPath = configPath

View file

@ -39,7 +39,7 @@ func NewRepoCommand() *cobra.Command {
// NewRepoAddCommand returns a new instance of an `argocd repo add` command
func NewRepoAddCommand() *cobra.Command {
var (
repo appsv1.Respository
repo appsv1.Repository
)
var command = &cobra.Command{
Use: "add",
@ -73,7 +73,7 @@ func NewRepoAddCommand() *cobra.Command {
return command
}
func promptCredentials(repo *appsv1.Respository) {
func promptCredentials(repo *appsv1.Repository) {
reader := bufio.NewReader(os.Stdin)
if repo.Username == "" {
fmt.Print("Username: ")
@ -82,7 +82,7 @@ func promptCredentials(repo *appsv1.Respository) {
}
if repo.Password == "" {
fmt.Print("Password: ")
bytePassword, _ := terminal.ReadPassword(int(syscall.Stdin))
bytePassword, _ := terminal.ReadPassword(syscall.Stdin)
repo.Password = string(bytePassword)
}
}
@ -123,7 +123,7 @@ func NewRepoListCommand() *cobra.Command {
for _, r := range repos.Items {
fmt.Fprintf(w, "%s\t%s\n", r.Repo, r.Username)
}
w.Flush()
_ = w.Flush()
},
}
return command

26
gometalinter.json Normal file
View file

@ -0,0 +1,26 @@
{
"Vendor": true,
"DisableAll": true,
"Deadline": "3m",
"Enable": [
"vet",
"gofmt",
"deadcode",
"errcheck",
"varcheck",
"structcheck",
"ineffassign",
"unconvert",
"misspell"
],
"Skip": [
"pkg/client",
"vendor/",
".pb.go"
],
"Exclude": [
"pkg/client",
"vendor/",
".pb.go"
]
}

View file

@ -16,8 +16,8 @@
Cluster
ClusterList
ClusterSpec
Respository
RespositoryList
Repository
RepositoryList
*/
package v1alpha1
@ -73,13 +73,13 @@ func (m *ClusterSpec) Reset() { *m = ClusterSpec{} }
func (*ClusterSpec) ProtoMessage() {}
func (*ClusterSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} }
func (m *Respository) Reset() { *m = Respository{} }
func (*Respository) ProtoMessage() {}
func (*Respository) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
func (m *Repository) Reset() { *m = Repository{} }
func (*Repository) ProtoMessage() {}
func (*Repository) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} }
func (m *RespositoryList) Reset() { *m = RespositoryList{} }
func (*RespositoryList) ProtoMessage() {}
func (*RespositoryList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
func (m *RepositoryList) Reset() { *m = RepositoryList{} }
func (*RepositoryList) ProtoMessage() {}
func (*RepositoryList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} }
func init() {
proto.RegisterType((*Application)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application")
@ -90,8 +90,8 @@ func init() {
proto.RegisterType((*Cluster)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Cluster")
proto.RegisterType((*ClusterList)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ClusterList")
proto.RegisterType((*ClusterSpec)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ClusterSpec")
proto.RegisterType((*Respository)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Respository")
proto.RegisterType((*RespositoryList)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.RespositoryList")
proto.RegisterType((*Repository)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository")
proto.RegisterType((*RepositoryList)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.RepositoryList")
}
func (m *Application) Marshal() (dAtA []byte, err error) {
size := m.Size()
@ -357,7 +357,7 @@ func (m *ClusterSpec) MarshalTo(dAtA []byte) (int, error) {
return i, nil
}
func (m *Respository) Marshal() (dAtA []byte, err error) {
func (m *Repository) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
@ -367,7 +367,7 @@ func (m *Respository) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
func (m *Respository) MarshalTo(dAtA []byte) (int, error) {
func (m *Repository) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
@ -387,7 +387,7 @@ func (m *Respository) MarshalTo(dAtA []byte) (int, error) {
return i, nil
}
func (m *RespositoryList) Marshal() (dAtA []byte, err error) {
func (m *RepositoryList) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
@ -397,7 +397,7 @@ func (m *RespositoryList) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
func (m *RespositoryList) MarshalTo(dAtA []byte) (int, error) {
func (m *RepositoryList) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
@ -524,7 +524,7 @@ func (m *ClusterSpec) Size() (n int) {
return n
}
func (m *Respository) Size() (n int) {
func (m *Repository) Size() (n int) {
var l int
_ = l
l = len(m.Repo)
@ -536,7 +536,7 @@ func (m *Respository) Size() (n int) {
return n
}
func (m *RespositoryList) Size() (n int) {
func (m *RepositoryList) Size() (n int) {
var l int
_ = l
l = m.ListMeta.Size()
@ -652,11 +652,11 @@ func (this *ClusterSpec) String() string {
}, "")
return s
}
func (this *Respository) String() string {
func (this *Repository) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Respository{`,
s := strings.Join([]string{`&Repository{`,
`Repo:` + fmt.Sprintf("%v", this.Repo) + `,`,
`Username:` + fmt.Sprintf("%v", this.Username) + `,`,
`Password:` + fmt.Sprintf("%v", this.Password) + `,`,
@ -664,13 +664,13 @@ func (this *Respository) String() string {
}, "")
return s
}
func (this *RespositoryList) String() string {
func (this *RepositoryList) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&RespositoryList{`,
s := strings.Join([]string{`&RepositoryList{`,
`ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
`Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Respository", "Respository", 1), `&`, ``, 1) + `,`,
`Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Repository", "Repository", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
@ -1589,7 +1589,7 @@ func (m *ClusterSpec) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *Respository) Unmarshal(dAtA []byte) error {
func (m *Repository) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@ -1612,10 +1612,10 @@ func (m *Respository) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Respository: wiretype end group for non-group")
return fmt.Errorf("proto: Repository: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Respository: illegal tag %d (wire type %d)", fieldNum, wire)
return fmt.Errorf("proto: Repository: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@ -1726,7 +1726,7 @@ func (m *Respository) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *RespositoryList) Unmarshal(dAtA []byte) error {
func (m *RepositoryList) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@ -1749,10 +1749,10 @@ func (m *RespositoryList) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: RespositoryList: wiretype end group for non-group")
return fmt.Errorf("proto: RepositoryList: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RespositoryList: illegal tag %d (wire type %d)", fieldNum, wire)
return fmt.Errorf("proto: RepositoryList: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@ -1811,7 +1811,7 @@ func (m *RespositoryList) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Items = append(m.Items, Respository{})
m.Items = append(m.Items, Repository{})
if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@ -1947,55 +1947,56 @@ func init() {
}
var fileDescriptorGenerated = []byte{
// 797 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x54, 0x4d, 0x4f, 0x33, 0x45,
0x1c, 0xef, 0xf2, 0x66, 0x99, 0x0a, 0xc2, 0x1a, 0x4d, 0xe5, 0xb0, 0x90, 0x3d, 0x18, 0x0e, 0x30,
0x2b, 0x28, 0x46, 0x2f, 0x26, 0x2e, 0x28, 0xc1, 0x60, 0x24, 0x83, 0x26, 0xc6, 0x98, 0xe8, 0xb0,
0xfd, 0xb3, 0x1d, 0xba, 0xbb, 0x33, 0x99, 0x99, 0xad, 0xe1, 0xe6, 0xdd, 0x8b, 0x9f, 0xc6, 0xaf,
0x20, 0x47, 0x12, 0x34, 0xe1, 0x60, 0x88, 0xd4, 0x6f, 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9, 0x44, 0x8f, 0x19, 0x19, 0xeb, 0xf3, 0xb4, 0x2d, 0xe4, 0xff, 0xe1, 0xa0, 0x86,
0xc5, 0x3c, 0xc3, 0x2e, 0x88, 0x47, 0x77, 0x41, 0xf8, 0xf8, 0xc0, 0xa6, 0xec, 0x81, 0xbd, 0x61,
0x54, 0x66, 0x58, 0xde, 0x45, 0x0b, 0x0a, 0x64, 0x17, 0xa4, 0x6d, 0xab, 0xb2, 0x3d, 0xcd, 0x2b,
0xb1, 0xbf, 0xfe, 0x2f, 0x0e, 0x6a, 0x10, 0x50, 0x82, 0x2b, 0xa6, 0xb9, 0xbc, 0x2c, 0x26, 0x5a,
0x82, 0xe0, 0xd6, 0x6a, 0x98, 0xbf, 0x62, 0xe6, 0x89, 0xf9, 0x71, 0xb7, 0x50, 0x3d, 0x57, 0x20,
0x33, 0x9a, 0x82, 0xed, 0xab, 0x61, 0xfc, 0xdf, 0xd8, 0x77, 0x32, 0x44, 0x14, 0x68, 0x41, 0x95,
0xfa, 0x89, 0xcb, 0x96, 0x1d, 0xfe, 0x21, 0xfa, 0xc4, 0xbe, 0x93, 0x21, 0xc2, 0xec, 0xea, 0x8a,
0x37, 0xaf, 0xd6, 0xae, 0xae, 0x38, 0xfe, 0x70, 0x8d, 0x42, 0x7c, 0x75, 0xef, 0xd5, 0xae, 0xef,
0xbd, 0xda, 0xed, 0xbd, 0x57, 0xfb, 0xb9, 0xe7, 0x39, 0x57, 0x3d, 0xcf, 0xb9, 0xee, 0x79, 0xce,
0x6d, 0xcf, 0x73, 0xfe, 0xee, 0x79, 0xce, 0xaf, 0xff, 0x78, 0xb5, 0xef, 0xea, 0x03, 0xc6, 0xff,
0x02, 0x00, 0x00, 0xff, 0xff, 0xa5, 0x62, 0xea, 0xc6, 0xbe, 0x09, 0x00, 0x00,
// 806 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x4d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, 0xfb,
0xee, 0x02, 0xf9, 0xf8, 0xe2, 0xd6, 0xa9, 0x5c, 0xde, 0x3a, 0x95, 0xeb, 0x5b, 0xa7, 0xf2, 0x4f,
0xd7, 0xb1, 0x2e, 0xba, 0x8e, 0x75, 0xd9, 0x75, 0xac, 0xeb, 0xae, 0x63, 0xbd, 0xec, 0x3a, 0xd6,
0x7f, 0xaf, 0x9c, 0xca, 0xef, 0xd5, 0x3e, 0xe1, 0x9b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x61, 0xb1,
0x2a, 0xec, 0xbb, 0x09, 0x00, 0x00,
}

View file

@ -86,8 +86,8 @@ message ClusterSpec {
optional string server = 1;
}
// Respository is a Git repository holding application configurations
message Respository {
// Repository is a Git repository holding application configurations
message Repository {
optional string repo = 1;
optional string username = 2;
@ -95,10 +95,10 @@ message Respository {
optional string password = 3;
}
// RespositoryList is a collection of Repositories.
message RespositoryList {
// RepositoryList is a collection of Repositories.
message RepositoryList {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
repeated Respository items = 2;
repeated Repository items = 2;
}

View file

@ -83,15 +83,15 @@ type ClusterSpec struct {
Server string `json:"server" protobuf:"bytes,1,opt,name=server"`
}
// Respository is a Git repository holding application configurations
type Respository struct {
// Repository is a Git repository holding application configurations
type Repository struct {
Repo string `json:"repo" protobuf:"bytes,1,opt,name=repo"`
Username string `json:"username" protobuf:"bytes,2,opt,name=username"`
Password string `json:"password" protobuf:"bytes,3,opt,name=password"`
}
// RespositoryList is a collection of Repositories.
type RespositoryList struct {
// RepositoryList is a collection of Repositories.
type RepositoryList struct {
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Items []Respository `json:"items" protobuf:"bytes,2,rep,name=items"`
Items []Repository `json:"items" protobuf:"bytes,2,rep,name=items"`
}

View file

@ -196,39 +196,39 @@ func (in *ClusterSpec) DeepCopy() *ClusterSpec {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Respository) DeepCopyInto(out *Respository) {
func (in *Repository) DeepCopyInto(out *Repository) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Respository.
func (in *Respository) DeepCopy() *Respository {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Repository.
func (in *Repository) DeepCopy() *Repository {
if in == nil {
return nil
}
out := new(Respository)
out := new(Repository)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RespositoryList) DeepCopyInto(out *RespositoryList) {
func (in *RepositoryList) DeepCopyInto(out *RepositoryList) {
*out = *in
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Respository, len(*in))
*out = make([]Repository, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RespositoryList.
func (in *RespositoryList) DeepCopy() *RespositoryList {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryList.
func (in *RepositoryList) DeepCopy() *RepositoryList {
if in == nil {
return nil
}
out := new(RespositoryList)
out := new(RepositoryList)
in.DeepCopyInto(out)
return out
}

View file

@ -37,7 +37,7 @@ func NewServer(namespace string, kubeclientset kubernetes.Interface, appclientse
}
// List returns list of repositories
func (s *Server) List(ctx context.Context, q *RepoQuery) (*appsv1.RespositoryList, error) {
func (s *Server) List(ctx context.Context, q *RepoQuery) (*appsv1.RepositoryList, error) {
listOpts := metav1.ListOptions{}
labelSelector := labels.NewSelector()
req, err := labels.NewRequirement(common.LabelKeySecretType, selection.Equals, []string{common.SecretTypeRepository})
@ -50,8 +50,8 @@ func (s *Server) List(ctx context.Context, q *RepoQuery) (*appsv1.RespositoryLis
if err != nil {
return nil, err
}
repoList := appsv1.RespositoryList{
Items: make([]appsv1.Respository, len(repoSecrets.Items)),
repoList := appsv1.RepositoryList{
Items: make([]appsv1.Repository, len(repoSecrets.Items)),
}
for i, repoSec := range repoSecrets.Items {
repoList.Items[i] = *secretToRepo(&repoSec)
@ -60,7 +60,7 @@ func (s *Server) List(ctx context.Context, q *RepoQuery) (*appsv1.RespositoryLis
}
// Create creates a repository
func (s *Server) Create(ctx context.Context, r *appsv1.Respository) (*appsv1.Respository, error) {
func (s *Server) Create(ctx context.Context, r *appsv1.Repository) (*appsv1.Repository, error) {
repoURL := git.NormalizeGitURL(r.Repo)
err := git.TestRepo(repoURL, r.Username, r.Password)
if err != nil {
@ -90,7 +90,7 @@ func (s *Server) Create(ctx context.Context, r *appsv1.Respository) (*appsv1.Res
}
// Get returns a repository by URL
func (s *Server) Get(ctx context.Context, q *RepoQuery) (*appsv1.Respository, error) {
func (s *Server) Get(ctx context.Context, q *RepoQuery) (*appsv1.Repository, error) {
secName := repoURLToSecretName(q.Repo)
repoSecret, err := s.kubeclientset.CoreV1().Secrets(s.ns).Get(secName, metav1.GetOptions{})
if err != nil {
@ -100,7 +100,7 @@ func (s *Server) Get(ctx context.Context, q *RepoQuery) (*appsv1.Respository, er
}
// Update updates a repository
func (s *Server) Update(ctx context.Context, r *appsv1.Respository) (*appsv1.Respository, error) {
func (s *Server) Update(ctx context.Context, r *appsv1.Repository) (*appsv1.Repository, error) {
secName := repoURLToSecretName(r.Repo)
repoSecret, err := s.kubeclientset.CoreV1().Secrets(s.ns).Get(secName, metav1.GetOptions{})
if err != nil {
@ -124,7 +124,7 @@ func (s *Server) Update(ctx context.Context, r *appsv1.Respository) (*appsv1.Res
}
// UpdateREST updates a repository (from a REST request)
func (s *Server) UpdateREST(ctx context.Context, r *RepoUpdateRequest) (*appsv1.Respository, error) {
func (s *Server) UpdateREST(ctx context.Context, r *RepoUpdateRequest) (*appsv1.Repository, error) {
return s.Update(ctx, r.Repo)
}
@ -147,8 +147,8 @@ func repoURLToSecretName(repo string) string {
}
// secretToRepo converts a secret into a repository object
func secretToRepo(s *apiv1.Secret) *appsv1.Respository {
repo := appsv1.Respository{
func secretToRepo(s *apiv1.Secret) *appsv1.Repository {
repo := appsv1.Repository{
Repo: string(s.Data["repository"]),
Username: string(s.Data["username"]),
Password: string(s.Data["password"]),

View file

@ -42,7 +42,7 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// RepoQuery is a query for respository resources
// RepoQuery is a query for Repository resources
type RepoQuery struct {
Repo string `protobuf:"bytes,1,opt,name=repo" json:"repo,omitempty"`
}
@ -68,8 +68,8 @@ func (*RepoResponse) ProtoMessage() {}
func (*RepoResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
type RepoUpdateRequest struct {
Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
Repo *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository `protobuf:"bytes,2,opt,name=repo" json:"repo,omitempty"`
Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
Repo *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository `protobuf:"bytes,2,opt,name=repo" json:"repo,omitempty"`
}
func (m *RepoUpdateRequest) Reset() { *m = RepoUpdateRequest{} }
@ -84,7 +84,7 @@ func (m *RepoUpdateRequest) GetUrl() string {
return ""
}
func (m *RepoUpdateRequest) GetRepo() *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository {
func (m *RepoUpdateRequest) GetRepo() *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository {
if m != nil {
return m.Repo
}
@ -109,15 +109,15 @@ const _ = grpc.SupportPackageIsVersion4
type RepositoryServiceClient interface {
// List returns list of repos
List(ctx context.Context, in *RepoQuery, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.RespositoryList, error)
List(ctx context.Context, in *RepoQuery, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.RepositoryList, error)
// Create creates a repo
Create(ctx context.Context, in *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, error)
Create(ctx context.Context, in *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error)
// Get returns a repo by name
Get(ctx context.Context, in *RepoQuery, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, error)
Get(ctx context.Context, in *RepoQuery, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error)
// Update updates a repo
Update(ctx context.Context, in *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, error)
Update(ctx context.Context, in *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error)
// Update updates a repo (special handler intended to be used only by the gRPC gateway)
UpdateREST(ctx context.Context, in *RepoUpdateRequest, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, error)
UpdateREST(ctx context.Context, in *RepoUpdateRequest, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error)
// Delete updates a repo
Delete(ctx context.Context, in *RepoQuery, opts ...grpc.CallOption) (*RepoResponse, error)
}
@ -130,8 +130,8 @@ func NewRepositoryServiceClient(cc *grpc.ClientConn) RepositoryServiceClient {
return &repositoryServiceClient{cc}
}
func (c *repositoryServiceClient) List(ctx context.Context, in *RepoQuery, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.RespositoryList, error) {
out := new(github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.RespositoryList)
func (c *repositoryServiceClient) List(ctx context.Context, in *RepoQuery, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.RepositoryList, error) {
out := new(github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.RepositoryList)
err := grpc.Invoke(ctx, "/repository.RepositoryService/List", in, out, c.cc, opts...)
if err != nil {
return nil, err
@ -139,8 +139,8 @@ func (c *repositoryServiceClient) List(ctx context.Context, in *RepoQuery, opts
return out, nil
}
func (c *repositoryServiceClient) Create(ctx context.Context, in *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, error) {
out := new(github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository)
func (c *repositoryServiceClient) Create(ctx context.Context, in *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error) {
out := new(github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository)
err := grpc.Invoke(ctx, "/repository.RepositoryService/Create", in, out, c.cc, opts...)
if err != nil {
return nil, err
@ -148,8 +148,8 @@ func (c *repositoryServiceClient) Create(ctx context.Context, in *github_com_arg
return out, nil
}
func (c *repositoryServiceClient) Get(ctx context.Context, in *RepoQuery, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, error) {
out := new(github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository)
func (c *repositoryServiceClient) Get(ctx context.Context, in *RepoQuery, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error) {
out := new(github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository)
err := grpc.Invoke(ctx, "/repository.RepositoryService/Get", in, out, c.cc, opts...)
if err != nil {
return nil, err
@ -157,8 +157,8 @@ func (c *repositoryServiceClient) Get(ctx context.Context, in *RepoQuery, opts .
return out, nil
}
func (c *repositoryServiceClient) Update(ctx context.Context, in *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, error) {
out := new(github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository)
func (c *repositoryServiceClient) Update(ctx context.Context, in *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error) {
out := new(github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository)
err := grpc.Invoke(ctx, "/repository.RepositoryService/Update", in, out, c.cc, opts...)
if err != nil {
return nil, err
@ -166,8 +166,8 @@ func (c *repositoryServiceClient) Update(ctx context.Context, in *github_com_arg
return out, nil
}
func (c *repositoryServiceClient) UpdateREST(ctx context.Context, in *RepoUpdateRequest, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, error) {
out := new(github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository)
func (c *repositoryServiceClient) UpdateREST(ctx context.Context, in *RepoUpdateRequest, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error) {
out := new(github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository)
err := grpc.Invoke(ctx, "/repository.RepositoryService/UpdateREST", in, out, c.cc, opts...)
if err != nil {
return nil, err
@ -188,15 +188,15 @@ func (c *repositoryServiceClient) Delete(ctx context.Context, in *RepoQuery, opt
type RepositoryServiceServer interface {
// List returns list of repos
List(context.Context, *RepoQuery) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.RespositoryList, error)
List(context.Context, *RepoQuery) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.RepositoryList, error)
// Create creates a repo
Create(context.Context, *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, error)
Create(context.Context, *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error)
// Get returns a repo by name
Get(context.Context, *RepoQuery) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, error)
Get(context.Context, *RepoQuery) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error)
// Update updates a repo
Update(context.Context, *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, error)
Update(context.Context, *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error)
// Update updates a repo (special handler intended to be used only by the gRPC gateway)
UpdateREST(context.Context, *RepoUpdateRequest) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository, error)
UpdateREST(context.Context, *RepoUpdateRequest) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository, error)
// Delete updates a repo
Delete(context.Context, *RepoQuery) (*RepoResponse, error)
}
@ -224,7 +224,7 @@ func _RepositoryService_List_Handler(srv interface{}, ctx context.Context, dec f
}
func _RepositoryService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository)
in := new(github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository)
if err := dec(in); err != nil {
return nil, err
}
@ -236,7 +236,7 @@ func _RepositoryService_Create_Handler(srv interface{}, ctx context.Context, dec
FullMethod: "/repository.RepositoryService/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RepositoryServiceServer).Create(ctx, req.(*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository))
return srv.(RepositoryServiceServer).Create(ctx, req.(*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository))
}
return interceptor(ctx, in, info, handler)
}
@ -260,7 +260,7 @@ func _RepositoryService_Get_Handler(srv interface{}, ctx context.Context, dec fu
}
func _RepositoryService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository)
in := new(github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository)
if err := dec(in); err != nil {
return nil, err
}
@ -272,7 +272,7 @@ func _RepositoryService_Update_Handler(srv interface{}, ctx context.Context, dec
FullMethod: "/repository.RepositoryService/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RepositoryServiceServer).Update(ctx, req.(*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Respository))
return srv.(RepositoryServiceServer).Update(ctx, req.(*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository))
}
return interceptor(ctx, in, info, handler)
}
@ -349,35 +349,35 @@ var _RepositoryService_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("server/repository/repository.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 469 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0xbf, 0x6e, 0x14, 0x31,
0x10, 0xc6, 0x71, 0x12, 0x1d, 0x8a, 0x41, 0x08, 0x46, 0x01, 0x85, 0x25, 0x51, 0x22, 0xd3, 0x9c,
0x22, 0xc5, 0xd6, 0x85, 0x06, 0xa5, 0xe4, 0xaf, 0x40, 0x34, 0x5c, 0xa0, 0x49, 0x01, 0x72, 0xf6,
0x46, 0x8e, 0xb9, 0x65, 0x6d, 0x6c, 0xef, 0x4a, 0x11, 0x4a, 0x41, 0x1a, 0x44, 0x4d, 0x87, 0xc4,
0x83, 0xf0, 0x1c, 0xbc, 0x02, 0x0f, 0x82, 0xec, 0xd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, 0xfe, 0xf6, 0xbc, 0x67, 0xe8, 0xc2,
0x53, 0x79, 0xd0, 0x4b, 0x2f, 0xce, 0x83, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x09, 0x43, 0xda,
0x60, 0x46, 0x05, 0x00, 0x00,
// 470 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0x41, 0x6b, 0x14, 0x31,
0x14, 0xc7, 0x4d, 0x5b, 0x06, 0x1a, 0x45, 0xf4, 0x51, 0xa5, 0x8e, 0x2d, 0x2d, 0xf1, 0xb2, 0x14,
0x9a, 0xb0, 0xf5, 0x22, 0x3d, 0xaa, 0x45, 0x0a, 0x5e, 0x9c, 0xea, 0x41, 0x0f, 0x4a, 0x3a, 0xfb,
0x98, 0xc6, 0x1d, 0x27, 0x31, 0xc9, 0x0c, 0x14, 0x29, 0x88, 0x07, 0xf1, 0xee, 0xc5, 0x83, 0xdf,
0xc3, 0x0f, 0xe2, 0x57, 0xf0, 0x5b, 0x78, 0x91, 0x64, 0xa6, 0xbb, 0x6b, 0xbb, 0xed, 0x69, 0x0e,
0xbd, 0xfd, 0xe7, 0x4d, 0xf2, 0xf2, 0xcb, 0xff, 0xe5, 0x3d, 0xca, 0x1c, 0xda, 0x06, 0xad, 0xb0,
0x68, 0xb4, 0x53, 0x5e, 0xdb, 0xe3, 0x19, 0xc9, 0x8d, 0xd5, 0x5e, 0x03, 0x9d, 0x46, 0xd2, 0x95,
0x42, 0x17, 0x3a, 0x86, 0x45, 0x50, 0xed, 0x8a, 0x74, 0xad, 0xd0, 0xba, 0x28, 0x51, 0x48, 0xa3,
0x84, 0xac, 0x2a, 0xed, 0xa5, 0x57, 0xba, 0x72, 0xdd, 0x5f, 0x36, 0x7e, 0xe4, 0xb8, 0xd2, 0xf1,
0x6f, 0xae, 0x2d, 0x8a, 0x66, 0x28, 0x0a, 0xac, 0xd0, 0x4a, 0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xe9, 0x11, 0xfa, 0xb9, 0x76, 0xda, 0x4f, 0x1a, 0xb6, 0x11, 0xb1, 0xef, 0xb1,
0xb9, 0xd8, 0xbb, 0x64, 0x0b, 0xbe, 0x11, 0xba, 0xf8, 0x0c, 0x2f, 0x74, 0xb0, 0x27, 0x8c, 0x07,
0x11, 0x63, 0x1d, 0xee, 0xcf, 0xc3, 0x10, 0x9f, 0xc2, 0xd7, 0x09, 0xfc, 0x20, 0x34, 0x69, 0x9f,
0xd8, 0x15, 0x33, 0xf1, 0x1a, 0xfc, 0x24, 0x94, 0x76, 0xaf, 0x7f, 0xef, 0xe0, 0x25, 0xac, 0x9f,
0x35, 0xeb, 0xbf, 0xce, 0xe8, 0xeb, 0xd8, 0x41, 0x34, 0x8d, 0xa5, 0xe9, 0x7c, 0xd3, 0x6a, 0x5b,
0x9e, 0xec, 0xc6, 0xee, 0x80, 0xb7, 0x34, 0x79, 0x8a, 0x25, 0x7a, 0xbc, 0xa8, 0x8c, 0xab, 0x67,
0xc3, 0x93, 0xde, 0xee, 0x2a, 0xb3, 0x75, 0x59, 0x65, 0x1e, 0x8b, 0x37, 0xdb, 0x97, 0x8d, 0x9f,
0x73, 0x23, 0xf2, 0x30, 0x89, 0x93, 0xe6, 0xe1, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x0a,
0x51, 0x7f, 0x3e, 0x05, 0x00, 0x00,
}

View file

@ -47,7 +47,7 @@ func request_RepositoryService_List_0(ctx context.Context, marshaler runtime.Mar
}
func request_RepositoryService_Create_0(ctx context.Context, marshaler runtime.Marshaler, client RepositoryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq v1alpha1.Respository
var protoReq v1alpha1.Repository
var metadata runtime.ServerMetadata
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil {

View file

@ -12,7 +12,7 @@ import "k8s.io/api/core/v1/generated.proto";
import "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1/generated.proto";
// RepoQuery is a query for respository resources
// RepoQuery is a query for Repository resources
message RepoQuery {
string repo = 1;
}
@ -21,19 +21,19 @@ message RepoResponse {}
message RepoUpdateRequest {
string url = 1;
github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Respository repo = 2;
github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository repo = 2;
}
// RepositoryService
service RepositoryService {
// List returns list of repos
rpc List(RepoQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.RespositoryList) {
rpc List(RepoQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.RepositoryList) {
option (google.api.http).get = "/api/v1/repositories";
}
// Create creates a repo
rpc Create(github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Respository) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Respository) {
rpc Create(github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository) {
option (google.api.http) = {
post: "/api/v1/repositories"
body: "*"
@ -41,16 +41,16 @@ service RepositoryService {
}
// Get returns a repo by name
rpc Get(RepoQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Respository) {
rpc Get(RepoQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository) {
option (google.api.http).get = "/api/v1/repositories/{repo}";
}
// Update updates a repo
rpc Update(github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Respository) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Respository) {
rpc Update(github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository) {
}
// Update updates a repo (special handler intended to be used only by the gRPC gateway)
rpc UpdateREST(RepoUpdateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Respository) {
rpc UpdateREST(RepoUpdateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository) {
option (google.api.http) = {
put: "/api/v1/repositories/{url}"
body: "repo"

View file

@ -106,8 +106,8 @@ func (a *ArgoCDServer) Run() {
// Start the muxed listeners for our servers
log.Infof("argocd %s serving on port %d", argocd.GetVersion(), port)
go grpcS.Serve(grpcL)
go httpS.Serve(httpL)
go func() { _ = grpcS.Serve(grpcL) }()
go func() { _ = httpS.Serve(httpL) }()
err = m.Serve()
if err != nil {
panic(err)