cockroach: Index | Files

package licenseccl

import ""


Package Files

license.go license.pb.go


const LicensePrefix = "crl-0-"

LicensePrefix is a prefix on license strings to make them easily recognized.


var (
    ErrInvalidLengthLicense = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowLicense   = fmt.Errorf("proto: integer overflow")
var License_Type_name = map[int32]string{
    0:  "NonCommercial",
    1:  "Enterprise",
    2:  "Evaluation",
var License_Type_value = map[string]int32{
    "NonCommercial": 0,
    "Enterprise":    1,
    "Evaluation":    2,

type License Uses

type License struct {
    ClusterID         []github_com_cockroachdb_cockroach_pkg_util_uuid.UUID `protobuf:"bytes,1,rep,name=cluster_id,json=clusterId,proto3," json:"cluster_id"`
    ValidUntilUnixSec int64                                                 `protobuf:"varint,2,opt,name=valid_until_unix_sec,json=validUntilUnixSec,proto3" json:"valid_until_unix_sec,omitempty"`
    Type              License_Type                                          `protobuf:"varint,3,opt,name=type,proto3,enum=cockroach.ccl.utilccl.licenseccl.License_Type" json:"type,omitempty"`
    OrganizationName  string                                                `protobuf:"bytes,4,opt,name=organization_name,json=organizationName,proto3" json:"organization_name,omitempty"`

func Decode Uses

func Decode(s string) (*License, error)

Decode attempts to read a base64 encoded License.

func (*License) Check Uses

func (l *License) Check(at time.Time, cluster uuid.UUID, org, feature string) error

Check returns an error if the license is empty or not currently valid.

func (*License) Descriptor Uses

func (*License) Descriptor() ([]byte, []int)

func (License) Encode Uses

func (l License) Encode() (string, error)

Encode serializes the License as a base64 string.

func (*License) Marshal Uses

func (m *License) Marshal() (dAtA []byte, err error)

func (*License) MarshalTo Uses

func (m *License) MarshalTo(dAtA []byte) (int, error)

func (*License) ProtoMessage Uses

func (*License) ProtoMessage()

func (*License) Reset Uses

func (m *License) Reset()

func (*License) Size Uses

func (m *License) Size() (n int)

func (*License) String Uses

func (m *License) String() string

func (*License) Unmarshal Uses

func (m *License) Unmarshal(dAtA []byte) error

func (*License) XXX_DiscardUnknown Uses

func (m *License) XXX_DiscardUnknown()

func (*License) XXX_Marshal Uses

func (m *License) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*License) XXX_Merge Uses

func (dst *License) XXX_Merge(src proto.Message)

func (*License) XXX_Size Uses

func (m *License) XXX_Size() int

func (*License) XXX_Unmarshal Uses

func (m *License) XXX_Unmarshal(b []byte) error

type License_Type Uses

type License_Type int32
const (
    License_NonCommercial License_Type = 0
    License_Enterprise    License_Type = 1
    License_Evaluation    License_Type = 2

func (License_Type) EnumDescriptor Uses

func (License_Type) EnumDescriptor() ([]byte, []int)

func (License_Type) String Uses

func (x License_Type) String() string

Package licenseccl imports 14 packages (graph) and is imported by 24 packages. Updated 2019-08-17. Refresh now. Tools for package owners.