Documentation
¶
Overview ¶
+k8s:deepcopy-gen=package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
func Convert(claims *AccountClaims) (*jwt.AccountClaims, error)
Types ¶
type Account ¶
type Account struct { // A list of account/subject combinations that this account is allowed to import // +kubebuilder:validation:Optional Imports []Import `json:"imports,omitempty"` // A list of account/subject combinations that this account is allowed to export // +kubebuilder:validation:Optional Exports []Export `json:"exports,omitempty"` // A set of limits for this account // +kubebuilder:validation:Optional Limits OperatorLimits `json:"limits,omitempty"` // A list of signing keys the account can use // +kubebuilder:validation:Optional SigningKeys []string `json:"signingKeys,omitempty"` // Stores user JWTs that have been revoked and the time they were revoked // +kubebuilder:validation:Optional Revocations map[string]int64 `json:"revocations,omitempty"` // Default pub/sub permissions for this account that users inherit // +kubebuilder:validation:Optional DefaultPermissions common.Permissions `json:"defaultPermissions,omitempty"` // Stores subjects that get mapped to other subjects using a weighted mapping. // For more information see https://docs.nats.io/nats-concepts/subject_mapping // +kubebuilder:validation:Optional Mappings map[string][]WeightedMapping `json:"mappings,omitempty"` // Enable external authorization for account users. // +kubebuilder:validation:Optional Authorization ExternalAuthorization `json:"authorization,omitempty"` common.Info `json:",inline"` common.GenericFields `json:",inline"` }
Specifies account specific claims data
func (*Account) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Account.
func (*Account) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AccountClaims ¶
type AccountClaims struct { // Common data for all JWTs common.ClaimsData `json:",inline"` // Account specific claims // +kubebuilder:validation:Optional Account `json:"account,omitempty"` }
+kubebuilder:object:generate=true Specifies claims of the JWT
func (*AccountClaims) DeepCopy ¶
func (in *AccountClaims) DeepCopy() *AccountClaims
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountClaims.
func (*AccountClaims) DeepCopyInto ¶
func (in *AccountClaims) DeepCopyInto(out *AccountClaims)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AccountLimits ¶
type AccountLimits struct { // Max number of imports // +kubebuilder:validation:Optional Imports int64 `json:"imports,omitempty"` // Max number of exports // +kubebuilder:validation:Optional Exports int64 `json:"exports,omitempty"` // Specifies if wildcards are allowed in exports // +kubebuilder:validation:Optional WildcardExports bool `json:"wildcardExports,omitempty"` // Specifies that user JWT can't be bearer token // +kubebuilder:validation:Optional DisallowBearer bool `json:"disallowBearer,omitempty"` // Max number of connections // +kubebuilder:validation:Optional Conn int64 `json:"conn,omitempty"` // Max number of leaf node connections // +kubebuilder:validation:Optional LeafNodeConn int64 `json:"leafNodeConn,omitempty"` }
func (*AccountLimits) DeepCopy ¶
func (in *AccountLimits) DeepCopy() *AccountLimits
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountLimits.
func (*AccountLimits) DeepCopyInto ¶
func (in *AccountLimits) DeepCopyInto(out *AccountLimits)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Export ¶
type Export struct { // The name of the export // +kubebuilder:validation:Optional Name string `json:"name,omitempty"` // The subject to export // +kubebuilder:validation:Optional Subject string `json:"subject,omitempty"` // The type of the export // +kubebuilder:validation:Optional Type string `json:"type,omitempty"` // Specifies if a token is required for the export // +kubebuilder:validation:Optional TokenReq bool `json:"tokenReq,omitempty"` // The revocations for the export // +kubebuilder:validation:Optional Revocations map[string]int64 `json:"revocations,omitempty"` // The response type for the export // +kubebuilder:validation:Optional ResponseType string `json:"responseType,omitempty"` // The response threshold for the export // +kubebuilder:validation:Optional ResponseThreshold string `json:"responseThreshold,omitempty"` // The latency for the export. // +kubebuilder:validation:Optional Latency *ServiceLatency `json:"serviceLatency,omitempty"` // The account token position for the export // +kubebuilder:validation:Optional AccountTokenPosition uint `json:"accountTokenPosition,omitempty"` // Specifies if the export is advertised // +kubebuilder:validation:Optional Advertise bool `json:"advertise,omitempty"` common.Info `json:",inline"` }
Export describes a mapping from this account to another one
func (*Export) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Export.
func (*Export) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExternalAuthorization ¶ added in v1.7.0
type ExternalAuthorization struct { AuthUsers []string `json:"auth_users,omitempty"` AllowedAccounts []string `json:"allowed_accounts,omitempty"` XKey string `json:"xkey,omitempty"` }
Enable external authorization for account users.
func (*ExternalAuthorization) DeepCopy ¶ added in v1.7.0
func (in *ExternalAuthorization) DeepCopy() *ExternalAuthorization
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalAuthorization.
func (*ExternalAuthorization) DeepCopyInto ¶ added in v1.7.0
func (in *ExternalAuthorization) DeepCopyInto(out *ExternalAuthorization)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Import ¶
type Import struct { // The name of the import // +kubebuilder:validation:Optional Name string `json:"name,omitempty"` // The subject to import // +kubebuilder:validation:Optional Subject string `json:"subject,omitempty"` // The account to import from // +kubebuilder:validation:Optional Account string `json:"account,omitempty"` // The token to use for the import // +kubebuilder:validation:Optional Token string `json:"token,omitempty"` // The local subject to import to // +kubebuilder:validation:Optional LocalSubject string `json:"localSubject,omitempty"` // The type of the import // +kubebuilder:validation:Optional Type string `json:"type,omitempty"` // +kubebuilder:validation:Optional Share bool `json:"share,omitempty"` }
Import describes a mapping from another account into this one
func (*Import) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Import.
func (*Import) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JetStreamLimits ¶
type JetStreamLimits struct { // Max number of bytes stored in memory across all streams. (0 means disabled) // +kubebuilder:validation:Optional MemoryStorage int64 `json:"memStorage,omitempty"` // Max number of bytes stored on disk across all streams. (0 means disabled) // +kubebuilder:validation:Optional DiskStorage int64 `json:"diskStorage,omitempty"` // Max number of streams // +kubebuilder:validation:Optional Streams int64 `json:"streams,omitempty"` // Max number of consumers // +kubebuilder:validation:Optional Consumer int64 `json:"consumer,omitempty"` // Max number of acks pending // +kubebuilder:validation:Optional MaxAckPending int64 `json:"maxAckPending,omitempty"` // Max number of bytes a stream can have in memory. (0 means unlimited) // +kubebuilder:validation:Optional // +kubebuilder:default=0 MemoryMaxStreamBytes int64 `json:"memMaxStreamBytes,omitempty"` // Max number of bytes a stream can have on disk. (0 means unlimited) // +kubebuilder:validation:Optional // +kubebuilder:default=0 DiskMaxStreamBytes int64 `json:"diskMaxStreamBytes,omitempty"` // Max bytes required by all Streams // +kubebuilder:validation:Optional MaxBytesRequired bool `json:"maxBytesRequired,omitempty"` }
JetStreamLimits represents the Jetstream limits for an account
func (*JetStreamLimits) DeepCopy ¶
func (in *JetStreamLimits) DeepCopy() *JetStreamLimits
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JetStreamLimits.
func (*JetStreamLimits) DeepCopyInto ¶
func (in *JetStreamLimits) DeepCopyInto(out *JetStreamLimits)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OperatorLimits ¶
type OperatorLimits struct { common.NatsLimits `json:",inline"` AccountLimits `json:",inline"` JetStreamLimits `json:",inline"` }
OperatorLimits represents the limits for that are set on an account
func (*OperatorLimits) DeepCopy ¶
func (in *OperatorLimits) DeepCopy() *OperatorLimits
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorLimits.
func (*OperatorLimits) DeepCopyInto ¶
func (in *OperatorLimits) DeepCopyInto(out *OperatorLimits)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceLatency ¶
type ServiceLatency struct { // Specifies the sampling for the latency Sampling int `json:"sampling"` // Specifies the results for the latency Results string `json:"results"` }
func (*ServiceLatency) DeepCopy ¶
func (in *ServiceLatency) DeepCopy() *ServiceLatency
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceLatency.
func (*ServiceLatency) DeepCopyInto ¶
func (in *ServiceLatency) DeepCopyInto(out *ServiceLatency)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WeightedMapping ¶
type WeightedMapping struct { // The subject to map to Subject string `json:"subject"` // The amount of 100% that this mapping should be used // +kubebuilder:validation:Optional Weight uint8 `json:"weight,omitempty"` // The cluster to map to // +kubebuilder:validation:Optional Cluster string `json:"cluster,omitempty"` }
WeightedMapping is a mapping from one subject to another with a weight and a destination cluster
func (*WeightedMapping) DeepCopy ¶
func (in *WeightedMapping) DeepCopy() *WeightedMapping
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WeightedMapping.
func (*WeightedMapping) DeepCopyInto ¶
func (in *WeightedMapping) DeepCopyInto(out *WeightedMapping)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.