...

Source file src/github.com/chrismellard/docker-credential-acr-env/cmd/get.go

Documentation: github.com/chrismellard/docker-credential-acr-env/cmd

     1  /*
     2  Copyright © 2020 Chris Mellard chris.mellard@icloud.com
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  package cmd
    17  
    18  import (
    19  	"github.com/chrismellard/docker-credential-acr-env/pkg/credhelper"
    20  	"github.com/docker/docker-credential-helpers/credentials"
    21  	"github.com/spf13/cobra"
    22  )
    23  
    24  // getCmd represents the get command
    25  var getCmd = &cobra.Command{
    26  	Use:   "get",
    27  	Short: "for the server specified via stdin, return the stored credentials via stdout",
    28  	Run: func(cmd *cobra.Command, args []string) {
    29  		credentials.Serve(credhelper.NewACRCredentialsHelper())
    30  	},
    31  }
    32  
    33  func init() {
    34  	rootCmd.AddCommand(getCmd)
    35  }
    36  

View as plain text