Skip to main content

AuthN | Go SDK | Agreements Endpoints

Agreements Endpoints

Create an agreement

func (a *Agreements) Create(ctx context.Context, input AgreementCreateRequest) (*pangea.PangeaResponse[AgreementCreateResult], error)

Create an agreement.

required parameters

context.Context
input := authn.AgreementCreateRequest{
	Type: authn.ATeula,
	Name: "EULA_V1",
	Text: "You agree to behave yourself while logged in.",
}

resp, err := authncli.Agreements.Create(ctx, input)

Delete an agreement

func (a *Agreements) Delete(ctx context.Context, input AgreementDeleteRequest) (*pangea.PangeaResponse[AgreementDeleteResult], error)

Delete an agreement.

required parameters

context.Context
input := authn.AgreementDeleteRequest{
	Type: authn.ATeula,
	ID: "peu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
}

resp, err := authncli.Agreements.Delete(ctx, input)

List agreements

func (a *Agreements) List(ctx context.Context, input AgreementListRequest) (*pangea.PangeaResponse[AgreementListResult], error)

List agreements.

required parameters

context.Context
input := authn.AgreementListRequest{}

resp, err := authncli.Agreements.List(ctx, input)

Update agreement

func (a *Agreements) Update(ctx context.Context, input AgreementUpdateRequest) (*pangea.PangeaResponse[AgreementUpdateResult], error)

Update agreement.

required parameters

context.Context
input := authn.AgreementUpdateRequest{
	Type: authn.ATeula,
	ID: pangea.String("peu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a"),
	Text: pangea.String("You agree to behave yourself while logged in. Don't be evil."),
}

resp, err := authncli.Agreements.Update(ctx, input)

Type AgreementCreateRequest

type AgreementCreateRequest struct

required parameters

AgreementType `json:"type"`
string `json:"name"`
string `json:"text"`
*bool `json:"active,omitempty"`
type AgreementCreateRequest struct {
	pangea.BaseRequest

	Type	AgreementType	`json:"type"`
	Name	string		`json:"name"`
	Text	string		`json:"text"`
	Active	*bool		`json:"active,omitempty"`
}

Type AgreementDeleteRequest

type AgreementDeleteRequest struct

required parameters

AgreementType `json:"type"`
string `json:"id"`
type AgreementDeleteRequest struct {
	pangea.BaseRequest

	Type	AgreementType	`json:"type"`
	ID	string		`json:"id"`
}

Type AgreementListOrderBy

type AgreementListOrderBy string
type AgreementListOrderBy string

Type AgreementListRequest

type AgreementListRequest struct

required parameters

map[string]any `json:"filter,omitempty"`

Should use FilterAgreementList object here

string `json:"last,omitempty"`
int `json:"size,omitempty"`
type AgreementListRequest struct {
	pangea.BaseRequest

	// Should use FilterAgreementList object here
	Filter	map[string]any		`json:"filter,omitempty"`
	Last	string			`json:"last,omitempty"`
	Order	ItemOrder		`json:"order,omitempty"`
	OrderBy	AgreementListOrderBy	`json:"order_by,omitempty"`
	Size	int			`json:"size,omitempty"`
}

Type AgreementType

type AgreementType string
type AgreementType string

Type AgreementUpdateRequest

type AgreementUpdateRequest struct

required parameters

AgreementType `json:"type"`
string `json:"id"`
*string `json:"name,omitempty"`
*string `json:"text,omitempty"`
*bool `json:"active,omitempty"`
type AgreementUpdateRequest struct {
	pangea.BaseRequest

	Type	AgreementType	`json:"type"`
	ID	string		`json:"id"`
	Name	*string		`json:"name,omitempty"`
	Text	*string		`json:"text,omitempty"`
	Active	*bool		`json:"active,omitempty"`
}

Type ItemOrder

type ItemOrder string
type ItemOrder string