Documentation
¶
Overview ¶
Package organization is responsible for OTF organizations
Index ¶
Constants ¶
View Source
const ( DefaultSessionTimeout = 20160 DefaultSessionExpiration = 20160 )
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService(opts Options) *service
Types ¶
type Authorizer ¶
Authorizer authorizes access to an organization
type Client ¶
type Client struct {
otf.JSONAPIClient
}
func (*Client) CreateOrganization ¶
func (c *Client) CreateOrganization(ctx context.Context, options OrganizationCreateOptions) (*Organization, error)
CreateOrganization creates a new organization with the given options.
type Entitlements ¶
type Entitlements struct {
ID string
Agents bool
AuditLogging bool
CostEstimation bool
Operations bool
PrivateModuleRegistry bool
SSO bool
Sentinel bool
StateStorage bool
Teams bool
VCSIntegrations bool
}
OTF is free and therefore the user is entitled to all currently supported services.
type Organization ¶
type Organization struct {
ID string
CreatedAt time.Time
UpdatedAt time.Time
Name string
SessionRemember int
SessionTimeout int
}
Organization is an OTF organization, comprising workspaces, users, etc.
func NewOrganization ¶
func NewOrganization(opts OrganizationCreateOptions) (*Organization, error)
func NewTestOrganization ¶
func NewTestOrganization(t *testing.T) *Organization
func (*Organization) String ¶
func (org *Organization) String() string
func (*Organization) Update ¶
func (org *Organization) Update(opts OrganizationUpdateOptions) error
type OrganizationCreateOptions ¶
type OrganizationCreateOptions struct {
Name *string `schema:"name,required"`
SessionRemember *int
SessionTimeout *int
}
OrganizationCreateOptions represents the options for creating an organization. See dto.OrganizationCreateOptions for more details.
func (*OrganizationCreateOptions) Validate ¶
func (opts *OrganizationCreateOptions) Validate() error
type OrganizationList ¶
type OrganizationList struct {
*otf.Pagination
Items []*Organization
}
OrganizationList represents a list of Organizations.
type OrganizationListOptions ¶
type OrganizationListOptions struct {
Names []string // filter organizations by name
otf.ListOptions
}
ListOptions represents the options for listing organizations.
type OrganizationService ¶
type OrganizationService = Service
type OrganizationUpdateOptions ¶
UpdateOptions represents the options for updating an organization.
type Service ¶
type Service interface {
CreateOrganization(ctx context.Context, opts OrganizationCreateOptions) (*Organization, error)
UpdateOrganization(ctx context.Context, name string, opts OrganizationUpdateOptions) (*Organization, error)
GetOrganization(ctx context.Context, name string) (*Organization, error)
GetOrganizationJSONAPI(ctx context.Context, name string) (*jsonapi.Organization, error)
ListOrganizations(ctx context.Context, opts OrganizationListOptions) (*OrganizationList, error)
DeleteOrganization(ctx context.Context, name string) error
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.