Help us shape the future of Go! Take the 2026 Go Developer Survey

policies

package
v0.0.0-...-9ec2bbf Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

README

Keystone policies

identity.Service.Policies exposes native CRUD and collections. ListRecords/AllRecords add SDK-owned Policy Body filters, nullable Resource/Wire views, ordinary limit/marker query handling and partial collection results. The guide compares standalone Python and Go usage and explains the concrete options and remaining runtime boundaries.

Documentation

Overview

Code generated by sdkgen from Gophercloud v2.15.0; DO NOT EDIT.

Code generated by sdkgen from Gophercloud v2.15.0; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Resources *resource.Collection[Policy]
	// contains filtered or unexported fields
}

API owns typed operations and their shared resource policies.

func New

func New(client *gophercloud.ServiceClient) *API

func (*API) All

func (a *API) All(ctx context.Context, options ...resource.ListOption) ([]*Policy, error)

func (*API) AllRecords

func (a *API) AllRecords(ctx context.Context, options ...RecordListOption) ([]*PolicyRecord, error)

AllRecords returns successfully consumed rows even after a later error.

func (*API) Create

func (a *API) Create(ctx context.Context, opts CreateOpts, options ...CreateOption) (*Policy, error)

Create invokes the upstream API with library-owned builders and result handling.

func (*API) Delete

func (a *API) Delete(ctx context.Context, policyID string) error

Delete invokes the upstream API with library-owned builders and result handling.

func (*API) Find

func (a *API) Find(ctx context.Context, ref resource.Ref, options ...resource.LookupOption) (*Policy, error)

func (*API) FindIdentity

func (a *API) FindIdentity(ctx context.Context, identity string, options ...resource.IdentityFindOption) (*Policy, error)

FindIdentity tries an ID request before exact ID/name fallback within this collection.

func (*API) Get

func (a *API) Get(ctx context.Context, policyID string) (*Policy, error)

Get invokes the upstream API with library-owned builders and result handling.

func (*API) List

func (a *API) List(ctx context.Context, options ...ListOption) iter.Seq2[*Policy, error]

List invokes the upstream API with library-owned builders and result handling.

func (*API) ListRecords

func (a *API) ListRecords(ctx context.Context, options ...RecordListOption) iter.Seq2[*PolicyRecord, error]

ListRecords implements the Policy list profile without changing native List or All. Only limit/marker are server filters; all known Body keys are local.

func (*API) RawClient

func (a *API) RawClient() *gophercloud.ServiceClient

func (*API) Remove

func (a *API) Remove(ctx context.Context, ref resource.Ref, options ...resource.LookupOption) error

func (*API) Update

func (a *API) Update(ctx context.Context, policyID string, opts UpdateOpts, options ...UpdateOption) (*Policy, error)

Update invokes the upstream API with library-owned builders and result handling.

func (*API) WaitFor

func (a *API) WaitFor(ctx context.Context, ref resource.Ref, status string, options ...resource.WaitOption) (*Policy, error)

func (*API) WaitForDeletion

func (a *API) WaitForDeletion(ctx context.Context, ref resource.Ref, options ...resource.WaitOption) error

type CreateOption

type CreateOption = request.Option[CreateOpts]

func WithCreateField

func WithCreateField(key string, value any) CreateOption

func WithCreateOptions

func WithCreateOptions(value CreateOpts) CreateOption

type CreateOpts

type CreateOpts = upstream.CreateOpts

type CreateResult

type CreateResult = upstream.CreateResult

type DeleteResult

type DeleteResult = upstream.DeleteResult

type GetResult

type GetResult = upstream.GetResult

type InvalidListFilter

type InvalidListFilter = upstream.InvalidListFilter

type ListOption

type ListOption = request.Option[ListOpts]

func WithListOptions

func WithListOptions(value ListOpts) ListOption

func WithListQuery

func WithListQuery(key, value string) ListOption

type ListOpts

type ListOpts = upstream.ListOpts

type Policy

type Policy = upstream.Policy

type PolicyPage

type PolicyPage = upstream.PolicyPage

type PolicyRecord

type PolicyRecord = neutronfind.Record

PolicyRecord keeps the declared Source view separately from remote fields and the physical page receipt. Policy Body values are nullable and untyped.

type RecordListOption

type RecordListOption func(*RecordListOpts) error

func WithRecordListFilter

func WithRecordListFilter(key string, value any) RecordListOption

WithRecordListFilter is a canonical Body filter, applied after each row is projected. Unknown keys are ignored before invoking JSON marshaling.

func WithRecordListHeader

func WithRecordListHeader(key, value string) RecordListOption

func WithRecordListLimit

func WithRecordListLimit(v int) RecordListOption

func WithRecordListMarker

func WithRecordListMarker(v string) RecordListOption

func WithRecordListMaxItems

func WithRecordListMaxItems(v int) RecordListOption

func WithRecordListOpts

func WithRecordListOpts(v RecordListOpts) RecordListOption

func WithRecordListPaginated

func WithRecordListPaginated(v bool) RecordListOption

type RecordListOpts

type RecordListOpts struct {
	Limit     *int
	Marker    string
	MaxItems  int
	Paginated *bool
	Filters   map[string]json.RawMessage
	Headers   map[string]string
}

type StringFieldLengthExceedsLimit

type StringFieldLengthExceedsLimit = upstream.StringFieldLengthExceedsLimit

type UpdateOption

type UpdateOption = request.Option[UpdateOpts]

func WithUpdateField

func WithUpdateField(key string, value any) UpdateOption

func WithUpdateOptions

func WithUpdateOptions(value UpdateOpts) UpdateOption

type UpdateOpts

type UpdateOpts = upstream.UpdateOpts

type UpdateResult

type UpdateResult = upstream.UpdateResult

Jump to

Keyboard shortcuts

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