Skip to main content

value.go

value.go - Overview

  1. Overview This file defines constants for preference value types and scopes, and it defines structs Range and PreferenceWithValue.

  2. Detailed Documentation

Constants

  • PreferenceValueTypeInteger

    • Purpose: Defines the string representation for the integer preference value type.
    • Value: "integer"
  • PreferenceValueTypeFloat

    • Purpose: Defines the string representation for the float preference value type.
    • Value: "float"
  • PreferenceValueTypeString

    • Purpose: Defines the string representation for the string preference value type.
    • Value: "string"
  • PreferenceValueTypeBoolean

    • Purpose: Defines the string representation for the boolean preference value type.
    • Value: "boolean"
  • OrgAllowedScope

    • Purpose: Defines the string representation for the organization allowed scope.
    • Value: "org"
  • UserAllowedScope

    • Purpose: Defines the string representation for the user allowed scope.
    • Value: "user"

Type Range

  • Purpose: Defines a range with a minimum and maximum value.
  • Fields:
    • Min:
      • Type: int64
      • Description: The minimum value of the range.
    • Max:
      • Type: int64
      • Description: The maximum value of the range.

Type PreferenceWithValue

  • Purpose: Combines a Preference with its associated value. It assumes the existence of a Preference type defined elsewhere.
  • Fields:
    • Preference:
      • Type: Preference
      • Description: An embedded Preference struct (definition not in this file).
    • Value:
      • Type: interface{}
      • Description: The value associated with the preference. Can be of any type.

Include in Getting Started: NO