WorkerKey class Client-Server API
A class to import and store information about Worker, can import/export as JSON strings.
api_key - should be unique for each Worker.
TODO: implement active server switch.
Example key look like this:
app : "AIS3USON web"
api_key : "3.01567984187"
name : "Test"
worker_dep_id: 1
dep_id : 1
dep : "Test Department"
servers: "https://alexqwesa.fvds.ru:48080|http://alexqwesa.fvds.ru:48081/|https://192.168.0.102:48082"
db : "kcson"
comment : "any text"
certBase64 : ""
Note: https:// or http:// in servers strings is necessary!
- Annotations
Constructors
- WorkerKey({required String app, required String name, required String api_key, required int worker_dep_id, required String dep, required String db, required String servers, @Default(0) int activeServerIndex, @Default('') String comment, @Default('') String certBase64})
-
constfactory
-
WorkerKey.fromJson(Map<
String, dynamic> json) -
factory
Properties
- activeHost → String
-
read-only
- activeHttp → String
-
read-only
- activePath → String
-
read-only
- activePort → String
-
read-only
- activeServer → String
-
read-only
- activeServerIndex → int
-
read-onlyinherited
- api_key → String
-
read-onlyinherited
- apiKey → String
-
read-only
- app → String
-
read-onlyinherited
- certBase64 → String
-
read-onlyinherited
- comment → String
-
read-onlyinherited
-
copyWith
→ $WorkerKeyCopyWith<
WorkerKey> -
read-onlyinherited
- db → String
-
read-onlyinherited
- dep → String
-
read-onlyinherited
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- name → String
-
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- servers → String
-
read-onlyinherited
- worker_dep_id → int
-
read-onlyinherited
- workerDepId → int
-
read-only
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited