github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/cf/api/resources/auth_tokens.go (about)

     1  package resources
     2  
     3  import "code.cloudfoundry.org/cli/cf/models"
     4  
     5  type PaginatedAuthTokenResources struct {
     6  	Resources []AuthTokenResource
     7  }
     8  
     9  type AuthTokenResource struct {
    10  	Resource
    11  	Entity AuthTokenEntity
    12  }
    13  
    14  type AuthTokenEntity struct {
    15  	Label    string
    16  	Provider string
    17  }
    18  
    19  func (resource AuthTokenResource) ToFields() (authToken models.ServiceAuthTokenFields) {
    20  	authToken.GUID = resource.Metadata.GUID
    21  	authToken.Label = resource.Entity.Label
    22  	authToken.Provider = resource.Entity.Provider
    23  	return
    24  }