github.com/dcarley/cf-cli@v6.24.1-0.20170220111324-4225ff346898+incompatible/api/cloudcontroller/wrapper/util/in_memory_cache.go (about)

     1  package util
     2  
     3  type InMemoryCache struct {
     4  	accessToken  string
     5  	refreshToken string
     6  }
     7  
     8  func (c InMemoryCache) AccessToken() string {
     9  	return c.accessToken
    10  }
    11  
    12  func (c InMemoryCache) RefreshToken() string {
    13  	return c.refreshToken
    14  }
    15  
    16  func (c *InMemoryCache) SetAccessToken(token string) {
    17  	c.accessToken = token
    18  }
    19  
    20  func (c *InMemoryCache) SetRefreshToken(token string) {
    21  	c.refreshToken = token
    22  }
    23  
    24  func NewInMemoryTokenCache() *InMemoryCache {
    25  	return new(InMemoryCache)
    26  }