...

Source file src/github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cache/null.go

Documentation: github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cache

     1  // Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License"). You may
     4  // not use this file except in compliance with the License. A copy of the
     5  // License is located at
     6  //
     7  //	http://aws.amazon.com/apache2.0/
     8  //
     9  // or in the "license" file accompanying this file. This file is distributed
    10  // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
    11  // express or implied. See the License for the specific language governing
    12  // permissions and limitations under the License.
    13  
    14  package cache
    15  
    16  type nullCredentialsCache struct{}
    17  
    18  func NewNullCredentialsCache() CredentialsCache {
    19  	return &nullCredentialsCache{}
    20  }
    21  
    22  func (n *nullCredentialsCache) Get(_ string) *AuthEntry {
    23  	return nil
    24  }
    25  
    26  func (n *nullCredentialsCache) GetPublic() *AuthEntry {
    27  	return nil
    28  }
    29  
    30  func (n *nullCredentialsCache) Set(_ string, _ *AuthEntry) {
    31  }
    32  
    33  func (n *nullCredentialsCache) List() []*AuthEntry {
    34  	return []*AuthEntry{}
    35  }
    36  
    37  func (n *nullCredentialsCache) Clear() {
    38  }
    39  

View as plain text