Movatterモバイル変換


[0]ホーム

URL:


ptype

package
v1.92.3Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License:BSD-3-ClauseImports:0Imported by:0

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package ptype contains types used by syspolicy.

It's a leaf package for dependency reasons and should not contain much if anycode, and should not import much (or anything).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typePreferenceOption

type PreferenceOptionbyte

PreferenceOption is a policy that governs whether a boolean variableis forcibly assigned an administrator-defined value, or allowed to receivea user-defined value.

const (ShowChoiceByPolicyPreferenceOption =iotaNeverByPolicyAlwaysByPolicy)

func (PreferenceOption)IsAlways

func (pPreferenceOption) IsAlways()bool

IsAlways reports whether the preference should always be enabled.

func (PreferenceOption)IsNever

func (pPreferenceOption) IsNever()bool

IsNever reports whether the preference should always be disabled.

func (*PreferenceOption)MarshalText

func (p *PreferenceOption) MarshalText() (text []byte, errerror)

MarshalText implementsencoding.TextMarshaler.

func (PreferenceOption)ShouldEnable

func (pPreferenceOption) ShouldEnable(userChoicebool)bool

ShouldEnable checks if the choice administered by this policy should beenabled. If the administrator has chosen a setting, the administrator'ssetting is returned, otherwise userChoice is returned.

func (PreferenceOption)Show

func (pPreferenceOption) Show()bool

Show reports whether the UI option that controls the choice administered bythis policy should be shown (that is, available for users to change).

Currently this is true if and only if the policy isShowChoiceByPolicy.

func (PreferenceOption)String

func (pPreferenceOption) String()string

String returns a string representation of p.

func (*PreferenceOption)UnmarshalText

func (p *PreferenceOption) UnmarshalText(text []byte)error

UnmarshalText implementsencoding.TextUnmarshaler.It never fails and sets p toShowChoiceByPolicy if the specified textdoes not represent a validPreferenceOption.

func (PreferenceOption)WillOverride

func (pPreferenceOption) WillOverride(userChoicebool)bool

WillOverride checks if the choice administered by the policy is differentfrom the user's choice.

typeVisibility

type Visibilitybyte

Visibility is a policy that controls whether or not a particularcomponent of a user interface is to be shown.

const (VisibleByPolicyVisibility = 'v'HiddenByPolicyVisibility = 'h')

func (Visibility)MarshalText

func (vVisibility) MarshalText() (text []byte, errerror)

MarshalText implementsencoding.TextMarshaler.

func (Visibility)Show

func (vVisibility) Show()bool

Show reports whether the UI option administered by this policy should be shown.Currently this is true if the policy is not [hiddenByPolicy].

func (Visibility)String

func (vVisibility) String()string

String returns a string representation of v.

func (*Visibility)UnmarshalText

func (v *Visibility) UnmarshalText(text []byte)error

UnmarshalText implementsencoding.TextUnmarshaler.It never fails and sets v toVisibleByPolicy if the specified textdoes not represent a validVisibility.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp