role

package
v0.0.0-...-83e2e3a Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RoleConverter

func RoleConverter(input Role) string

RoleConverter accepts a `Role` object and generates the Go code to build this object using builders.

Types

type Role

type Role struct {
	// The role identifier `managed:builtins:editor:permissions`
	Name string `json:"name"`
	// Optional display
	DisplayName *string `json:"displayName,omitempty"`
	// Name of the team.
	GroupName *string `json:"groupName,omitempty"`
	// Role description
	Description *string `json:"description,omitempty"`
	// Do not show this role
	Hidden bool `json:"hidden"`
}

func NewRole

func NewRole() *Role

NewRole creates a new Role object.

func (Role) Equals

func (resource Role) Equals(other Role) bool

Equals tests the equality of two `Role` objects.

func (*Role) UnmarshalJSONStrict

func (resource *Role) UnmarshalJSONStrict(raw []byte) error

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `Role` from JSON. Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (Role) Validate

func (resource Role) Validate() error

Validate checks all the validation constraints that may be defined on `Role` fields for violations and returns them.

type RoleBuilder

type RoleBuilder struct {
	// contains filtered or unexported fields
}

func NewRoleBuilder

func NewRoleBuilder() *RoleBuilder

func (*RoleBuilder) Build

func (builder *RoleBuilder) Build() (Role, error)

func (*RoleBuilder) Description

func (builder *RoleBuilder) Description(description string) *RoleBuilder

Role description

func (*RoleBuilder) DisplayName

func (builder *RoleBuilder) DisplayName(displayName string) *RoleBuilder

Optional display

func (*RoleBuilder) GroupName

func (builder *RoleBuilder) GroupName(groupName string) *RoleBuilder

Name of the team.

func (*RoleBuilder) Hidden

func (builder *RoleBuilder) Hidden(hidden bool) *RoleBuilder

Do not show this role

func (*RoleBuilder) Name

func (builder *RoleBuilder) Name(name string) *RoleBuilder

The role identifier `managed:builtins:editor:permissions`

Jump to

Keyboard shortcuts

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