github.com/leg100/ots@v0.0.7-0.20210919080622-034055ced4bd/entitlements.go (about)

     1  package ots
     2  
     3  import tfe "github.com/leg100/go-tfe"
     4  
     5  // Entitlements represents the entitlements of an organization. Unlike TFE/TFC,
     6  // OTS is free and therefore the user is entitled to all currently supported
     7  // services.
     8  type Entitlements struct {
     9  	*tfe.Entitlements
    10  }
    11  
    12  // DefaultEntitlements constructs an Entitlements struct with currently
    13  // supported entitlements.
    14  func DefaultEntitlements(organizationID string) *Entitlements {
    15  	return &Entitlements{
    16  		Entitlements: &tfe.Entitlements{
    17  			ID:           organizationID,
    18  			StateStorage: true,
    19  			Operations:   true,
    20  		},
    21  	}
    22  }