provisioner

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2019 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateProvisionJobBody

type CreateProvisionJobBody struct {
	Apps   []string `json:"apps,omitempty"`
	Tenant *string  `json:"tenant,omitempty"`
}

type Error

type Error struct {
	// Service error code
	Code string `json:"code"`
	// Human readable error message
	Message string `json:"message"`
}

type InviteBody

type InviteBody struct {
	Email   string   `json:"email"`
	Comment *string  `json:"comment,omitempty"`
	Groups  []string `json:"groups,omitempty"`
}

type InviteInfo

type InviteInfo struct {
	Comment   string           `json:"comment"`
	CreatedAt string           `json:"createdAt"`
	CreatedBy string           `json:"createdBy"`
	Email     string           `json:"email"`
	Errors    InviteInfoErrors `json:"errors"`
	ExpiresAt string           `json:"expiresAt"`
	Groups    []string         `json:"groups"`
	InviteID  string           `json:"inviteID"`
	Status    InviteInfoStatus `json:"status"`
	Tenant    string           `json:"tenant"`
	UpdatedAt string           `json:"updatedAt"`
	UpdatedBy string           `json:"updatedBy"`
}

type InviteInfoErrors

type InviteInfoErrors []InviteInfoErrorsItems

type InviteInfoErrorsItems

type InviteInfoErrorsItems struct {
	Action  string  `json:"action"`
	Code    string  `json:"code"`
	Message string  `json:"message"`
	Group   *string `json:"group,omitempty"`
}

type InviteInfoStatus

type InviteInfoStatus string
const (
	InviteInfoStatusCreated  InviteInfoStatus = "created"
	InviteInfoStatusInvited  InviteInfoStatus = "invited"
	InviteInfoStatusAccepted InviteInfoStatus = "accepted"
	InviteInfoStatusRejected InviteInfoStatus = "rejected"
	InviteInfoStatusExpired  InviteInfoStatus = "expired"
	InviteInfoStatusFailed   InviteInfoStatus = "failed"
	InviteInfoStatusInvalid  InviteInfoStatus = "invalid"
)

List of InviteInfoStatus

type Invites

type Invites []InviteInfo

type ProvisionJobInfo

type ProvisionJobInfo struct {
	Apps      []string               `json:"apps"`
	CreatedAt string                 `json:"createdAt"`
	CreatedBy string                 `json:"createdBy"`
	Errors    ProvisionJobInfoErrors `json:"errors"`
	JobID     string                 `json:"jobID"`
	Status    ProvisionJobInfoStatus `json:"status"`
	Tenant    string                 `json:"tenant"`
}

type ProvisionJobInfoErrors

type ProvisionJobInfoErrors []ProvisionJobInfoErrorsItems

type ProvisionJobInfoErrorsItems

type ProvisionJobInfoErrorsItems struct {
	Code     string  `json:"code"`
	JobStage string  `json:"job_stage"`
	Message  string  `json:"message"`
	App      *string `json:"app,omitempty"`
}

type ProvisionJobInfoStatus

type ProvisionJobInfoStatus string
const (
	ProvisionJobInfoStatusCreated   ProvisionJobInfoStatus = "created"
	ProvisionJobInfoStatusRunning   ProvisionJobInfoStatus = "running"
	ProvisionJobInfoStatusCompleted ProvisionJobInfoStatus = "completed"
)

List of ProvisionJobInfoStatus

type ProvisionJobs

type ProvisionJobs []ProvisionJobInfo

type Service

type Service services.BaseService

func NewService

func NewService(config *services.Config) (*Service, error)

NewService creates a new provisioner service client from the given Config

func (*Service) CreateInvite

func (s *Service) CreateInvite(inviteBody InviteBody, resp ...*http.Response) (*InviteInfo, error)

CreateInvite - provisioner service endpoint Creates an invitation for a person to join the tenant using their email address. Parameters:

inviteBody
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided

func (*Service) CreateProvisionJob

func (s *Service) CreateProvisionJob(createProvisionJobBody CreateProvisionJobBody, resp ...*http.Response) (*ProvisionJobInfo, error)

CreateProvisionJob - provisioner service endpoint Creates a new job that provisions a new tenant and subscribes apps to the tenant. Parameters:

createProvisionJobBody
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided

func (*Service) DeleteInvite

func (s *Service) DeleteInvite(inviteId string, resp ...*http.Response) error

DeleteInvite - provisioner service endpoint Removes an invitation in the given tenant. Parameters:

inviteId
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided

func (*Service) GetInvite

func (s *Service) GetInvite(inviteId string, resp ...*http.Response) (*InviteInfo, error)

GetInvite - provisioner service endpoint Returns an invitation in the given tenant. Parameters:

inviteId
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided

func (*Service) GetProvisionJob

func (s *Service) GetProvisionJob(jobId string, resp ...*http.Response) (*ProvisionJobInfo, error)

GetProvisionJob - provisioner service endpoint Returns details of a specific provision job. Parameters:

jobId
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided

func (*Service) GetTenant

func (s *Service) GetTenant(tenantName string, resp ...*http.Response) (*TenantInfo, error)

GetTenant - provisioner service endpoint Returns a specific tenant. Parameters:

tenantName
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided

func (*Service) ListInvites

func (s *Service) ListInvites(resp ...*http.Response) (*Invites, error)

ListInvites - provisioner service endpoint Returns a list of invitations in a given tenant. Parameters:

resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided

func (*Service) ListProvisionJobs

func (s *Service) ListProvisionJobs(resp ...*http.Response) (*ProvisionJobs, error)

ListProvisionJobs - provisioner service endpoint Returns a list of all provision jobs created by the user. Parameters:

resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided

func (*Service) ListTenants

func (s *Service) ListTenants(resp ...*http.Response) (*Tenants, error)

ListTenants - provisioner service endpoint Returns all tenants that the user can read. Parameters:

resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided

func (*Service) UpdateInvite

func (s *Service) UpdateInvite(inviteId string, updateInviteBody UpdateInviteBody, resp ...*http.Response) (*InviteInfo, error)

UpdateInvite - provisioner service endpoint Modifies an invitation in the given tenant. Parameters:

inviteId
updateInviteBody
resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided

type Servicer

type Servicer interface {
	/*
		CreateInvite - provisioner service endpoint
		Creates an invitation for a person to join the tenant using their email address.
		Parameters:
			inviteBody
			resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
	*/
	CreateInvite(inviteBody InviteBody, resp ...*http.Response) (*InviteInfo, error)
	/*
		CreateProvisionJob - provisioner service endpoint
		Creates a new job that provisions a new tenant and subscribes apps to the tenant.
		Parameters:
			createProvisionJobBody
			resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
	*/
	CreateProvisionJob(createProvisionJobBody CreateProvisionJobBody, resp ...*http.Response) (*ProvisionJobInfo, error)
	/*
		DeleteInvite - provisioner service endpoint
		Removes an invitation in the given tenant.
		Parameters:
			inviteId
			resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
	*/
	DeleteInvite(inviteId string, resp ...*http.Response) error
	/*
		GetInvite - provisioner service endpoint
		Returns an invitation in the given tenant.
		Parameters:
			inviteId
			resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
	*/
	GetInvite(inviteId string, resp ...*http.Response) (*InviteInfo, error)
	/*
		GetProvisionJob - provisioner service endpoint
		Returns details of a specific provision job.
		Parameters:
			jobId
			resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
	*/
	GetProvisionJob(jobId string, resp ...*http.Response) (*ProvisionJobInfo, error)
	/*
		GetTenant - provisioner service endpoint
		Returns a specific tenant.
		Parameters:
			tenantName
			resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
	*/
	GetTenant(tenantName string, resp ...*http.Response) (*TenantInfo, error)
	/*
		ListInvites - provisioner service endpoint
		Returns a list of invitations in a given tenant.
		Parameters:
			resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
	*/
	ListInvites(resp ...*http.Response) (*Invites, error)
	/*
		ListProvisionJobs - provisioner service endpoint
		Returns a list of all provision jobs created by the user.
		Parameters:
			resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
	*/
	ListProvisionJobs(resp ...*http.Response) (*ProvisionJobs, error)
	/*
		ListTenants - provisioner service endpoint
		Returns all tenants that the user can read.
		Parameters:
			resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
	*/
	ListTenants(resp ...*http.Response) (*Tenants, error)
	/*
		UpdateInvite - provisioner service endpoint
		Modifies an invitation in the given tenant.
		Parameters:
			inviteId
			updateInviteBody
			resp: an optional pointer to a http.Response to be populated by this method. NOTE: only the first resp pointer will be used if multiple are provided
	*/
	UpdateInvite(inviteId string, updateInviteBody UpdateInviteBody, resp ...*http.Response) (*InviteInfo, error)
}

Servicer represents the interface for implementing all endpoints for this service

type TenantInfo

type TenantInfo struct {
	CreatedAt string `json:"createdAt"`
	CreatedBy string `json:"createdBy"`
	Name      string `json:"name"`
	Status    string `json:"status"`
}

type Tenants

type Tenants []TenantInfo

type UpdateInviteBody

type UpdateInviteBody struct {
	Action UpdateInviteBodyAction `json:"action"`
}

type UpdateInviteBodyAction

type UpdateInviteBodyAction string
const (
	UpdateInviteBodyActionAccept UpdateInviteBodyAction = "accept"
	UpdateInviteBodyActionReject UpdateInviteBodyAction = "reject"
	UpdateInviteBodyActionResend UpdateInviteBodyAction = "resend"
)

List of UpdateInviteBodyAction

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL