Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the nats v1alpha1 API group. +kubebuilder:object:generate=true +groupName=nauth.io
Index ¶
- Constants
- Variables
- type Account
- type AccountClaims
- type AccountLimits
- type AccountList
- type AccountRef
- type AccountSpec
- type AccountStatus
- type CIDRList
- type Export
- type ExportType
- type Exports
- type Import
- type Imports
- type Info
- type JetStreamLimits
- type KeyInfo
- type NatsLimits
- type Permission
- type Permissions
- type RenamingSubject
- type ResponsePermission
- type ResponseType
- type RevocationList
- type SamplingRate
- type ServiceLatency
- type StringList
- type Subject
- type TagList
- type TimeRange
- type User
- type UserClaims
- type UserLimits
- type UserList
- type UserSpec
- type UserStatus
Constants ¶
const ( // ResponseTypeSingleton is used for a service that sends a single response only ResponseTypeSingleton = "Singleton" // ResponseTypeStream is used for a service that will send multiple responses ResponseTypeStream = "Stream" // ResponseTypeChunked is used for a service that sends a single response in chunks (so not quite a stream) ResponseTypeChunked = "Chunked" )
const MaxInfoLength = 8 * 1024
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "nauth.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AccountSpec `json:"spec,omitempty"`
Status AccountStatus `json:"status,omitempty"`
}
Account is the Schema for the accounts API.
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.
func (*Account) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Account) GetConditions ¶
type AccountClaims ¶
type AccountClaims struct {
// +optional
AccountLimits *AccountLimits `json:"accountLimits,omitempty"`
// +optional
Exports Exports `json:"exports,omitempty"`
// +optional
Imports Imports `json:"imports,omitempty"`
// +optional
JetStreamLimits *JetStreamLimits `json:"jetStreamLimits,omitempty"`
// +optional
NatsLimits *NatsLimits `json:"natsLimits,omitempty"`
}
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 {
// +optional
// +kubebuilder:default=-1
Imports *int64 `json:"imports,omitempty"` // Max number of imports
// +optional
// +kubebuilder:default=-1
Exports *int64 `json:"exports,omitempty"` // Max number of exports
// +optional
// +kubebuilder:default=true
WildcardExports *bool `json:"wildcards,omitempty"` // Are wildcards allowed in exports
// +optional
// +kubebuilder:default=-1
Conn *int64 `json:"conn,omitempty"` // Max number of active connections
// +optional
// +kubebuilder:default=-1
LeafNodeConn *int64 `json:"leaf,omitempty"` // Max number of active leaf node connections
}
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 AccountList ¶
type AccountList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Account `json:"items"`
}
AccountList contains a list of Account.
func (*AccountList) DeepCopy ¶
func (in *AccountList) DeepCopy() *AccountList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountList.
func (*AccountList) DeepCopyInto ¶
func (in *AccountList) DeepCopyInto(out *AccountList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AccountList) DeepCopyObject ¶
func (in *AccountList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AccountRef ¶
func (*AccountRef) DeepCopy ¶
func (in *AccountRef) DeepCopy() *AccountRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountRef.
func (*AccountRef) DeepCopyInto ¶
func (in *AccountRef) DeepCopyInto(out *AccountRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AccountSpec ¶
type AccountSpec struct {
// +optional
AccountLimits *AccountLimits `json:"accountLimits,omitempty"`
// +optional
Exports Exports `json:"exports,omitempty"`
// +optional
Imports Imports `json:"imports,omitempty"`
// +optional
JetStreamLimits *JetStreamLimits `json:"jetStreamLimits,omitempty"`
// +optional
NatsLimits *NatsLimits `json:"natsLimits,omitempty"`
}
AccountSpec defines the desired state of Account.
func (*AccountSpec) DeepCopy ¶
func (in *AccountSpec) DeepCopy() *AccountSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountSpec.
func (*AccountSpec) DeepCopyInto ¶
func (in *AccountSpec) DeepCopyInto(out *AccountSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AccountStatus ¶
type AccountStatus struct {
// +optional
Claims AccountClaims `json:"claims,omitempty"`
// +listType=map
// +listMapKey=type
// +patchStrategy=merge
// +patchMergeKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// +optional
ReconcileTimestamp metav1.Time `json:"reconcileTimestamp,omitempty"`
// +optional
SigningKey KeyInfo `json:"signingKey"`
// +optional
OperatorVersion string `json:"operatorVersion,omitempty"`
}
AccountStatus defines the observed state of Account.
func (*AccountStatus) DeepCopy ¶
func (in *AccountStatus) DeepCopy() *AccountStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountStatus.
func (*AccountStatus) DeepCopyInto ¶
func (in *AccountStatus) DeepCopyInto(out *AccountStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CIDRList ¶
type CIDRList TagList
func (CIDRList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CIDRList.
func (CIDRList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CIDRList) UnmarshalJSON ¶
type Export ¶
type Export struct {
Name string `json:"name,omitempty"`
Subject Subject `json:"subject,omitempty"`
Type ExportType `json:"type,omitempty"`
TokenReq bool `json:"tokenReq,omitempty"`
Revocations RevocationList `json:"revocations,omitempty"`
ResponseType ResponseType `json:"responseType,omitempty"`
ResponseThreshold time.Duration `json:"responseThreshold,omitempty"`
Latency *ServiceLatency `json:"serviceLatency,omitempty"`
AccountTokenPosition uint `json:"accountTokenPosition,omitempty"`
Advertise bool `json:"advertise,omitempty"`
AllowTrace bool `json:"allowTrace,omitempty"`
}
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 ExportType ¶
type ExportType string
ExportType defines the type of import/export. +kubebuilder:validation:Enum=stream;service +kubebuilder:default=stream
const ( // Stream defines the type field value for a stream "stream" Stream ExportType = "stream" // Service defines the type field value for a service "service" Service ExportType = "service" )
func (ExportType) ToInt ¶
func (e ExportType) ToInt() int
ToInt converts the ExportType to an int value: Stream=1, Service=2
type Exports ¶
type Exports []*Export
func (Exports) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Exports.
func (Exports) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Import ¶
type Import struct {
// AccountRefName references the account used to create the user.
AccountRef AccountRef `json:"accountRef"`
Name string `json:"name,omitempty"`
// Subject field in an import is always from the perspective of the
// initial publisher - in the case of a stream it is the account owning
// the stream (the exporter), and in the case of a service it is the
// account making the request (the importer).
Subject Subject `json:"subject,omitempty"`
Account string `json:"account,omitempty"`
// Local subject used to subscribe (for streams) and publish (for services) to.
// This value only needs setting if you want to change the value of Subject.
// If the value of Subject ends in > then LocalSubject needs to end in > as well.
// LocalSubject can contain $<number> wildcard references where number references the nth wildcard in Subject.
// The sum of wildcard reference and * tokens needs to match the number of * token in Subject.
LocalSubject RenamingSubject `json:"localSubject,omitempty"`
Type ExportType `json:"type,omitempty"`
AllowTrace bool `json:"allowTrace,omitempty"`
}
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 Imports ¶
type Imports []*Import
func (Imports) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Imports.
func (Imports) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Info ¶
type Info struct {
Description string `json:"description,omitempty"`
InfoURL string `json:"info_url,omitempty"`
}
func (*Info) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Info.
func (*Info) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JetStreamLimits ¶
type JetStreamLimits struct {
// +optional
// +kubebuilder:default=-1
MemoryStorage *int64 `json:"memStorage,omitempty"` // Max number of bytes stored in memory across all streams. (0 means disabled)
// +optional
// +kubebuilder:default=-1
DiskStorage *int64 `json:"diskStorage,omitempty"` // Max number of bytes stored on disk across all streams. (0 means disabled)
// +optional
// +kubebuilder:default=-1
Streams *int64 `json:"streams,omitempty"` // Max number of streams
// +optional
// +kubebuilder:default=-1
Consumer *int64 `json:"consumer,omitempty"` // Max number of consumers
// +optional
// +kubebuilder:default=-1
MaxAckPending *int64 `json:"maxAckPending,omitempty"` // Max ack pending of a Stream
// +optional
// +kubebuilder:default=-1
MemoryMaxStreamBytes *int64 `json:"memMaxStreamBytes,omitempty"` // Max bytes a memory backed stream can have. (0 means disabled/unlimited)
// +optional
// +kubebuilder:default=-1
DiskMaxStreamBytes *int64 `json:"diskMaxStreamBytes,omitempty"` // Max bytes a disk backed stream can have. (0 means disabled/unlimited)
// +optional
// +kubebuilder:default=false
MaxBytesRequired bool `json:"maxBytesRequired,omitempty"` // Max bytes required by all Streams
}
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 KeyInfo ¶
type KeyInfo struct {
Name string `json:"name,omitempty"`
CreationDate metav1.Time `json:"creationDate,omitempty"`
ExpirationDate metav1.Time `json:"expirationDate,omitempty"`
}
func (*KeyInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyInfo.
func (*KeyInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NatsLimits ¶
type NatsLimits struct {
// +optional
// +kubebuilder:default=-1
Subs *int64 `json:"subs,omitempty"` // Max number of subscriptions
// +optional
// +kubebuilder:default=-1
Data *int64 `json:"data,omitempty"` // Max number of bytes
// +optional
// +kubebuilder:default=-1
Payload *int64 `json:"payload,omitempty"` // Max message payload
}
func (*NatsLimits) DeepCopy ¶
func (in *NatsLimits) DeepCopy() *NatsLimits
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NatsLimits.
func (*NatsLimits) DeepCopyInto ¶
func (in *NatsLimits) DeepCopyInto(out *NatsLimits)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Permission ¶
type Permission struct {
// +optional
Allow StringList `json:"allow,omitempty"`
// +optional
Deny StringList `json:"deny,omitempty"`
}
Permission defines allow/deny subjects
func (*Permission) DeepCopy ¶
func (in *Permission) DeepCopy() *Permission
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Permission.
func (*Permission) DeepCopyInto ¶
func (in *Permission) DeepCopyInto(out *Permission)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Permission) Empty ¶
func (p *Permission) Empty() bool
type Permissions ¶
type Permissions struct {
// +optional
Pub Permission `json:"pub,omitempty"`
// +optional
Sub Permission `json:"sub,omitempty"`
// +optional
Resp *ResponsePermission `json:"resp,omitempty"`
}
Permissions are used to restrict subject access, either on a user or for everyone on a server by default
func (*Permissions) DeepCopy ¶
func (in *Permissions) DeepCopy() *Permissions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Permissions.
func (*Permissions) DeepCopyInto ¶
func (in *Permissions) DeepCopyInto(out *Permissions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RenamingSubject ¶
type RenamingSubject Subject
type ResponsePermission ¶
type ResponsePermission struct {
// +optional
MaxMsgs int `json:"max"`
// +optional
Expires time.Duration `json:"ttl"`
}
ResponsePermission can be used to allow responses to any reply subject that is received on a valid subscription.
func (*ResponsePermission) DeepCopy ¶
func (in *ResponsePermission) DeepCopy() *ResponsePermission
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResponsePermission.
func (*ResponsePermission) DeepCopyInto ¶
func (in *ResponsePermission) DeepCopyInto(out *ResponsePermission)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResponseType ¶
type ResponseType string
ResponseType is used to store an export response type +kubebuilder:validation:Enum=Singleton;Stream;Chunked
type RevocationList ¶
func (RevocationList) DeepCopy ¶
func (in RevocationList) DeepCopy() RevocationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RevocationList.
func (RevocationList) DeepCopyInto ¶
func (in RevocationList) DeepCopyInto(out *RevocationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SamplingRate ¶
type SamplingRate int
type ServiceLatency ¶
type ServiceLatency struct {
Sampling SamplingRate `json:"sampling"`
Results Subject `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 StringList ¶
type StringList []string
StringList is a wrapper for an array of strings
func (*StringList) Add ¶
func (u *StringList) Add(p ...string)
Add appends 1 or more strings to a list
func (*StringList) Contains ¶
func (u *StringList) Contains(p string) bool
Contains returns true if the list contains the string
func (StringList) DeepCopy ¶
func (in StringList) DeepCopy() StringList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringList.
func (StringList) DeepCopyInto ¶
func (in StringList) DeepCopyInto(out *StringList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StringList) Remove ¶
func (u *StringList) Remove(p ...string)
Remove removes 1 or more strings from a list
type TagList ¶
type TagList []string
TagList is a unique array of lower case strings All tag list methods lower case the strings in the arguments
func (TagList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagList.
func (TagList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TimeRange ¶
TimeRange is used to represent a start and end time
func (*TimeRange) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeRange.
func (*TimeRange) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type User ¶
type User struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec UserSpec `json:"spec,omitempty"`
Status UserStatus `json:"status,omitempty"`
}
User is the Schema for the users API.
func (*User) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new User.
func (*User) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*User) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*User) GetConditions ¶
func (*User) GetUserSecretName ¶
type UserClaims ¶
type UserClaims struct {
// +optional
AccountName string `json:"accountName"`
// +optional
Permissions *Permissions `json:"permissions,omitempty"`
// +optional
NatsLimits *NatsLimits `json:"natsLimits,omitempty"`
// +optional
UserLimits *UserLimits `json:"userLimits,omitempty"`
}
func (*UserClaims) DeepCopy ¶
func (in *UserClaims) DeepCopy() *UserClaims
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserClaims.
func (*UserClaims) DeepCopyInto ¶
func (in *UserClaims) DeepCopyInto(out *UserClaims)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserLimits ¶
type UserLimits struct {
// +optional
// Src is a comma separated list of CIDR specifications
Src CIDRList `json:"src,omitempty"`
// +optional
Times []TimeRange `json:"times,omitempty"`
// +optional
Locale string `json:"timesLocation,omitempty"`
}
func (*UserLimits) DeepCopy ¶
func (in *UserLimits) DeepCopy() *UserLimits
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserLimits.
func (*UserLimits) DeepCopyInto ¶
func (in *UserLimits) DeepCopyInto(out *UserLimits)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UserLimits) Empty ¶
func (u *UserLimits) Empty() bool
func (*UserLimits) IsUnlimited ¶
func (u *UserLimits) IsUnlimited() bool
type UserList ¶
type UserList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []User `json:"items"`
}
UserList contains a list of User.
func (*UserList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserList.
func (*UserList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UserList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type UserSpec ¶
type UserSpec struct {
// AccountName references the account used to create the user.
AccountName string `json:"accountName"`
// +optional
Permissions *Permissions `json:"permissions,omitempty"`
// +optional
UserLimits *UserLimits `json:"userLimits,omitempty"`
// +optional
NatsLimits *NatsLimits `json:"natsLimits,omitempty"`
}
UserSpec defines the desired state of User.
func (*UserSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserSpec.
func (*UserSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserStatus ¶
type UserStatus struct {
// +listType=map
// +listMapKey=type
// +patchStrategy=merge
// +patchMergeKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
// +optional
Claims UserClaims `json:"claims,omitempty"`
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// +optional
ReconcileTimestamp metav1.Time `json:"reconcileTimestamp,omitempty"`
// +optional
OperatorVersion string `json:"operatorVersion,omitempty"`
}
UserStatus defines the observed state of User.
func (*UserStatus) DeepCopy ¶
func (in *UserStatus) DeepCopy() *UserStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserStatus.
func (*UserStatus) DeepCopyInto ¶
func (in *UserStatus) DeepCopyInto(out *UserStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.