Rename producer to service and consumer to client

This commit is contained in:
2024-01-04 22:40:10 +01:00
parent 824edac9e9
commit 5fad1e678f
9 changed files with 140 additions and 150 deletions

View File

@@ -9,16 +9,16 @@ from sqlalchemy.orm import Session
from ...errors import ClanError from ...errors import ClanError
from .. import sql_crud, sql_db, sql_models from .. import sql_crud, sql_db, sql_models
from ..schemas import ( from ..schemas import (
Consumer, Client,
ConsumerCreate, ClientCreate,
Entity, Entity,
EntityCreate, EntityCreate,
Producer,
ProducerCreate,
Repository, Repository,
RepositoryCreate, RepositoryCreate,
Resolution, Resolution,
ResolutionCreate, ResolutionCreate,
Service,
ServiceCreate,
) )
from ..tags import Tags from ..tags import Tags
@@ -29,92 +29,82 @@ log = logging.getLogger(__name__)
######################### #########################
# # # #
# Producer # # Service #
# # # #
######################### #########################
@router.post("/api/v1/create_producer", response_model=Producer, tags=[Tags.producers]) @router.post("/api/v1/create_service", response_model=Service, tags=[Tags.services])
def create_producer( def create_service(
producer: ProducerCreate, db: Session = Depends(sql_db.get_db) service: ServiceCreate, db: Session = Depends(sql_db.get_db)
) -> Producer: ) -> Service:
# todo checken ob schon da ... # todo checken ob schon da ...
return sql_crud.create_producer(db=db, producer=producer) return sql_crud.create_service(db=db, service=service)
@router.get( @router.get("/api/v1/get_services", response_model=List[Service], tags=[Tags.services])
"/api/v1/get_producers", response_model=List[Producer], tags=[Tags.producers] def get_services(
)
def get_producers(
skip: int = 0, limit: int = 100, db: Session = Depends(sql_db.get_db) skip: int = 0, limit: int = 100, db: Session = Depends(sql_db.get_db)
) -> List[sql_models.Producer]: ) -> List[sql_models.Service]:
producers = sql_crud.get_producers(db, skip=skip, limit=limit) services = sql_crud.get_services(db, skip=skip, limit=limit)
return producers return services
@router.get( @router.get("/api/v1/get_service", response_model=List[Service], tags=[Tags.services])
"/api/v1/get_producer", response_model=List[Producer], tags=[Tags.producers] def get_service(
)
def get_producer(
entity_did: str = "did:sov:test:1234", entity_did: str = "did:sov:test:1234",
skip: int = 0, skip: int = 0,
limit: int = 100, limit: int = 100,
db: Session = Depends(sql_db.get_db), db: Session = Depends(sql_db.get_db),
) -> List[sql_models.Producer]: ) -> List[sql_models.Service]:
producer = sql_crud.get_producers_by_entity_did(db, entity_did=entity_did) service = sql_crud.get_services_by_entity_did(db, entity_did=entity_did)
return producer return service
@router.delete("/api/v1/delete_producer", tags=[Tags.producers]) @router.delete("/api/v1/delete_service", tags=[Tags.services])
def delete_producer( def delete_service(
entity_did: str = "did:sov:test:1234", entity_did: str = "did:sov:test:1234",
db: Session = Depends(sql_db.get_db), db: Session = Depends(sql_db.get_db),
) -> dict[str, str]: ) -> dict[str, str]:
sql_crud.delete_producer_by_entity_did(db, entity_did) sql_crud.delete_service_by_entity_did(db, entity_did)
return {"message": "Producer deleted"} return {"message": "service deleted"}
######################### #########################
# # # #
# Consumer # # Client #
# # # #
######################### #########################
@router.post("/api/v1/create_consumer", response_model=Consumer, tags=[Tags.consumers]) @router.post("/api/v1/create_client", response_model=Client, tags=[Tags.clients])
def create_consumer( def create_client(client: ClientCreate, db: Session = Depends(sql_db.get_db)) -> Client:
consumer: ConsumerCreate, db: Session = Depends(sql_db.get_db)
) -> Consumer:
# todo checken ob schon da ... # todo checken ob schon da ...
return sql_crud.create_consumer(db=db, consumer=consumer) return sql_crud.create_client(db=db, client=client)
@router.get( @router.get("/api/v1/get_clients", response_model=List[Client], tags=[Tags.clients])
"/api/v1/get_consumers", response_model=List[Consumer], tags=[Tags.consumers] def get_clients(
)
def get_consumers(
skip: int = 0, limit: int = 100, db: Session = Depends(sql_db.get_db) skip: int = 0, limit: int = 100, db: Session = Depends(sql_db.get_db)
) -> List[sql_models.Consumer]: ) -> List[sql_models.Client]:
consumers = sql_crud.get_consumers(db, skip=skip, limit=limit) clients = sql_crud.get_clients(db, skip=skip, limit=limit)
return consumers return clients
@router.get( @router.get("/api/v1/get_client", response_model=List[Client], tags=[Tags.clients])
"/api/v1/get_consumer", response_model=List[Consumer], tags=[Tags.consumers] def get_client(
)
def get_consumer(
entity_did: str = "did:sov:test:1234", entity_did: str = "did:sov:test:1234",
skip: int = 0, skip: int = 0,
limit: int = 100, limit: int = 100,
db: Session = Depends(sql_db.get_db), db: Session = Depends(sql_db.get_db),
) -> List[sql_models.Consumer]: ) -> List[sql_models.Client]:
consumer = sql_crud.get_consumers_by_entity_did(db, entity_did=entity_did) client = sql_crud.get_client_by_entity_did(db, entity_did=entity_did)
return consumer return client
@router.delete("/api/v1/delete_consumer", tags=[Tags.consumers]) @router.delete("/api/v1/delete_client", tags=[Tags.clients])
def delete_consumer( def delete_client(
entity_did: str = "did:sov:test:1234", entity_did: str = "did:sov:test:1234",
db: Session = Depends(sql_db.get_db), db: Session = Depends(sql_db.get_db),
) -> dict[str, str]: ) -> dict[str, str]:
sql_crud.delete_consumer_by_entity_did(db, entity_did) sql_crud.delete_client_by_entity_did(db, entity_did)
return {"message": "Consumer deleted"} return {"message": "client deleted"}
######################### #########################

View File

@@ -18,10 +18,10 @@ class Machine(BaseModel):
######################### #########################
# # # #
# Producer # # Service #
# # # #
######################### #########################
class ProducerBase(BaseModel): class ServiceBase(BaseModel):
uuid: str = "8e285c0c-4e40-430a-a477-26b3b81e30df" uuid: str = "8e285c0c-4e40-430a-a477-26b3b81e30df"
service_name: str = "Carlo's Printing" service_name: str = "Carlo's Printing"
service_type: str = "3D Printing" service_type: str = "3D Printing"
@@ -30,11 +30,11 @@ class ProducerBase(BaseModel):
other: dict = {"action": ["register", "deregister", "delete", "create"]} other: dict = {"action": ["register", "deregister", "delete", "create"]}
class ProducerCreate(ProducerBase): class ServiceCreate(ServiceBase):
entity_did: str = "did:sov:test:1234" entity_did: str = "did:sov:test:1234"
class Producer(ProducerCreate): class Service(ServiceCreate):
class Config: class Config:
orm_mode = True orm_mode = True
@@ -44,17 +44,17 @@ class Producer(ProducerCreate):
# Consumer # # Consumer #
# # # #
######################### #########################
class ConsumerBase(BaseModel): class ClientBase(BaseModel):
entity_did: str = "did:sov:test:1234" entity_did: str = "did:sov:test:1234"
producer_uuid: str = "8e285c0c-4e40-430a-a477-26b3b81e30df" service_uuid: str = "8e285c0c-4e40-430a-a477-26b3b81e30df"
other: dict = {"test": "test"} other: dict = {"test": "test"}
class ConsumerCreate(ConsumerBase): class ClientCreate(ClientBase):
pass pass
class Consumer(ConsumerCreate): class Client(ClientCreate):
id: int id: int
class Config: class Config:
@@ -66,7 +66,7 @@ class Consumer(ConsumerCreate):
# REPOSITORY # # REPOSITORY #
# # # #
######################### #########################
class RepositoryBase(ProducerBase): class RepositoryBase(ServiceBase):
pass pass
@@ -103,8 +103,8 @@ class EntityCreate(EntityBase):
class Entity(EntityCreate): class Entity(EntityCreate):
producers: List[Producer] = [] services: List[Service] = []
consumers: List[Consumer] = [] clients: List[Client] = []
repository: List[Repository] = [] repository: List[Repository] = []
class Config: class Config:

View File

@@ -8,84 +8,80 @@ from . import schemas, sql_models
######################### #########################
# # # #
# Producer # # service #
# # # #
######################### #########################
def create_producer( def create_service(db: Session, service: schemas.ServiceCreate) -> sql_models.Service:
db: Session, producer: schemas.ProducerCreate db_service = sql_models.Service(**service.dict())
) -> sql_models.Producer: db.add(db_service)
db_producer = sql_models.Producer(**producer.dict())
db.add(db_producer)
db.commit() db.commit()
db.refresh(db_producer) db.refresh(db_service)
return db_producer return db_service
def get_producers( def get_services(
db: Session, skip: int = 0, limit: int = 100 db: Session, skip: int = 0, limit: int = 100
) -> List[sql_models.Producer]: ) -> List[sql_models.Service]:
return db.query(sql_models.Producer).offset(skip).limit(limit).all() return db.query(sql_models.Service).offset(skip).limit(limit).all()
def get_producers_by_entity_did( def get_services_by_entity_did(
db: Session, entity_did: str, skip: int = 0, limit: int = 100 db: Session, entity_did: str, skip: int = 0, limit: int = 100
) -> List[sql_models.Producer]: ) -> List[sql_models.Service]:
return ( return (
db.query(sql_models.Producer) db.query(sql_models.Service)
.filter(sql_models.Producer.entity_did == entity_did) .filter(sql_models.Service.entity_did == entity_did)
.offset(skip) .offset(skip)
.limit(limit) .limit(limit)
.all() .all()
) )
def delete_producer_by_entity_did(db: Session, entity_did: str) -> None: def delete_service_by_entity_did(db: Session, entity_did: str) -> None:
db.query(sql_models.Producer).filter( db.query(sql_models.Service).filter(
sql_models.Producer.entity_did == entity_did sql_models.Service.entity_did == entity_did
).delete() ).delete()
db.commit() db.commit()
######################### #########################
# # # #
# Consumer # # client #
# # # #
######################### #########################
def create_consumer( def create_client(db: Session, client: schemas.ClientCreate) -> sql_models.Client:
db: Session, consumer: schemas.ConsumerCreate db_client = sql_models.Client(**client.dict())
) -> sql_models.Consumer: db.add(db_client)
db_consumer = sql_models.Consumer(**consumer.dict())
db.add(db_consumer)
db.commit() db.commit()
db.refresh(db_consumer) db.refresh(db_client)
return db_consumer return db_client
def get_consumers( def get_clients(
db: Session, skip: int = 0, limit: int = 100 db: Session, skip: int = 0, limit: int = 100
) -> List[sql_models.Consumer]: ) -> List[sql_models.Client]:
return db.query(sql_models.Consumer).offset(skip).limit(limit).all() return db.query(sql_models.Client).offset(skip).limit(limit).all()
def get_consumers_by_entity_did( def get_client_by_entity_did(
db: Session, entity_did: str, skip: int = 0, limit: int = 100 db: Session, entity_did: str, skip: int = 0, limit: int = 100
) -> List[sql_models.Consumer]: ) -> List[sql_models.Client]:
return ( return (
db.query(sql_models.Consumer) db.query(sql_models.Client)
.filter(sql_models.Consumer.entity_did == entity_did) .filter(sql_models.Client.entity_did == entity_did)
.offset(skip) .offset(skip)
.limit(limit) .limit(limit)
.all() .all()
) )
def delete_consumer_by_entity_did(db: Session, entity_did: str) -> None: def delete_client_by_entity_did(db: Session, entity_did: str) -> None:
db.query(sql_models.Consumer).filter( db.query(sql_models.Client).filter(
sql_models.Consumer.entity_did == entity_did sql_models.Client.entity_did == entity_did
).delete() ).delete()
db.commit() db.commit()
@@ -198,8 +194,8 @@ def delete_entity_by_did(db: Session, did: str) -> None:
def delete_entity_by_did_recursive(db: Session, did: str) -> None: def delete_entity_by_did_recursive(db: Session, did: str) -> None:
delete_producer_by_entity_did(db, did) delete_service_by_entity_did(db, did)
delete_consumer_by_entity_did(db, did) delete_client_by_entity_did(db, did)
delete_repository_by_entity_did(db, did) delete_repository_by_entity_did(db, did)
delete_entity_by_did(db, did) delete_entity_by_did(db, did)

View File

@@ -33,13 +33,13 @@ class Entity(Base):
other = Column(JSON) other = Column(JSON)
## Relations ## ## Relations ##
producers = relationship("Producer", back_populates="entity") services = relationship("Service", back_populates="entity")
consumers = relationship("Consumer", back_populates="entity") clients = relationship("Client", back_populates="entity")
repository = relationship("Repository", back_populates="entity") repository = relationship("Repository", back_populates="entity")
# TODO maby refactor to repositories # TODO maby refactor to repositories
class ProducerAbstract(Base): class ServiceAbstract(Base):
__abstract__ = True __abstract__ = True
# Queryable body # Queryable body
@@ -54,22 +54,22 @@ class ProducerAbstract(Base):
other = Column(JSON) other = Column(JSON)
class Producer(ProducerAbstract): class Service(ServiceAbstract):
__tablename__ = "producers" __tablename__ = "services"
# Usage is the consumers column # Usage is the clients column
## Relations ## ## Relations ##
# One entity can have many producers # One entity can have many services
entity = relationship("Entity", back_populates="producers") entity = relationship("Entity", back_populates="services")
entity_did = Column(String, ForeignKey("entities.did")) entity_did = Column(String, ForeignKey("entities.did"))
# One producer has many consumers # One service has many clients
consumers = relationship("Consumer", back_populates="producer") clients = relationship("Client", back_populates="service")
class Consumer(Base): class Client(Base):
__tablename__ = "consumers" __tablename__ = "clients"
## Queryable body ## ## Queryable body ##
id = Column(Integer, primary_key=True, index=True) id = Column(Integer, primary_key=True, index=True)
@@ -78,18 +78,18 @@ class Consumer(Base):
other = Column(JSON) other = Column(JSON)
## Relations ## ## Relations ##
# one entity can have many consumers # one entity can have many clients
entity = relationship("Entity", back_populates="consumers") entity = relationship("Entity", back_populates="clients")
entity_did = Column(String, ForeignKey("entities.did")) entity_did = Column(String, ForeignKey("entities.did"))
# one consumer has one producer # one client has one service
producer = relationship("Producer", back_populates="consumers") service = relationship("Service", back_populates="clients")
producer_uuid = Column(String, ForeignKey("producers.uuid")) service_uuid = Column(String, ForeignKey("services.uuid"))
__table_args__ = (UniqueConstraint("producer_uuid", "entity_did"),) __table_args__ = (UniqueConstraint("service_uuid", "entity_did"),)
class Repository(ProducerAbstract): class Repository(ServiceAbstract):
__tablename__ = "repositories" __tablename__ = "repositories"
time_created = Column(DateTime(timezone=True), server_default=func.now()) time_created = Column(DateTime(timezone=True), server_default=func.now())

View File

@@ -3,8 +3,8 @@ from typing import Any, Dict, List
class Tags(Enum): class Tags(Enum):
producers = "producers" services = "services"
consumers = "consumers" clients = "clients"
entities = "entities" entities = "entities"
repositories = "repositories" repositories = "repositories"
resolutions = "resolution" resolutions = "resolution"
@@ -15,12 +15,12 @@ class Tags(Enum):
tags_metadata: List[Dict[str, Any]] = [ tags_metadata: List[Dict[str, Any]] = [
{ {
"name": str(Tags.producers), "name": str(Tags.services),
"description": "Operations on a producer.", "description": "Operations on a service.",
}, },
{ {
"name": str(Tags.consumers), "name": str(Tags.clients),
"description": "Operations on a consumer.", "description": "Operations on a client.",
}, },
{ {
"name": str(Tags.entities), "name": str(Tags.entities),

View File

@@ -0,0 +1,3 @@
#!/usr/bin/env bash
while true ; do printf 'HTTP/1.1 200 OK\r\n\r\ncool, thanks' | nc -l -N 127.0.0.1 5555 ; done

View File

@@ -43,11 +43,11 @@ def make_test_post_and_get(
assert_extra_info(["time_created"], request_body, response.json()) assert_extra_info(["time_created"], request_body, response.json())
elif paramter == "resolution": elif paramter == "resolution":
assert_extra_info(["timestamp", "id"], request_body, response.json()) assert_extra_info(["timestamp", "id"], request_body, response.json())
elif paramter == "consumer": elif paramter == "client":
assert_extra_info(["id"], request_body, response.json()) assert_extra_info(["id"], request_body, response.json())
elif paramter == "entity": elif paramter == "entity":
assert_extra_info( assert_extra_info(
["consumers", "producers", "repository"], request_body, response.json() ["clients", "services", "repository"], request_body, response.json()
) )
else: else:
assert response.json() == request_body assert response.json() == request_body
@@ -60,11 +60,11 @@ def make_test_post_and_get(
assert_extra_info(["time_created"], request_body, response.json()[0]) assert_extra_info(["time_created"], request_body, response.json()[0])
elif paramter == "resolution": elif paramter == "resolution":
assert_extra_info(["timestamp", "id"], request_body, response.json()[0]) assert_extra_info(["timestamp", "id"], request_body, response.json()[0])
elif paramter == "consumer": elif paramter == "client":
assert_extra_info(["id"], request_body, response.json()[0]) assert_extra_info(["id"], request_body, response.json()[0])
elif paramter == "entity": elif paramter == "entity":
assert_extra_info( assert_extra_info(
["consumers", "producers", "repository"], request_body, response.json() ["clients", "services", "repository"], request_body, response.json()
) )
else: else:
assert response.json() == [request_body] assert response.json() == [request_body]
@@ -72,10 +72,10 @@ def make_test_post_and_get(
######################### #########################
# # # #
# Producer # # service #
# # # #
######################### #########################
def test_producer(api: TestClient) -> None: def test_service(api: TestClient) -> None:
request_body = { request_body = {
"uuid": "8e285c0c-4e40-430a-a477-26b3b81e30df", "uuid": "8e285c0c-4e40-430a-a477-26b3b81e30df",
"service_name": "Carlo'''s Printing", "service_name": "Carlo'''s Printing",
@@ -85,12 +85,12 @@ def test_producer(api: TestClient) -> None:
"other": {"action": ["register", "deregister", "delete", "create"]}, "other": {"action": ["register", "deregister", "delete", "create"]},
"entity_did": default_entity_did, "entity_did": default_entity_did,
} }
paramter = "producer" paramter = "service"
# get_request = "entity_did=did%3Asov%3Atest%3A1234" # get_request = "entity_did=did%3Asov%3Atest%3A1234"
make_test_post_and_get(api, request_body, paramter) make_test_post_and_get(api, request_body, paramter)
def test_producer2(api: TestClient) -> None: def test_service2(api: TestClient) -> None:
request_body = { request_body = {
"uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d1", "uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d1",
"service_name": "Luis'''s Fax", "service_name": "Luis'''s Fax",
@@ -100,12 +100,12 @@ def test_producer2(api: TestClient) -> None:
"other": {"action": ["register", "deregister", "delete", "create"]}, "other": {"action": ["register", "deregister", "delete", "create"]},
"entity_did": default_entity_did2, "entity_did": default_entity_did2,
} }
paramter = "producer" paramter = "service"
get_request = "entity_did=" + url.quote(default_entity_did2) get_request = "entity_did=" + url.quote(default_entity_did2)
make_test_post_and_get(api, request_body, paramter, get_request) make_test_post_and_get(api, request_body, paramter, get_request)
def test_producer3(api: TestClient) -> None: def test_service3(api: TestClient) -> None:
request_body = { request_body = {
"uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d2", "uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d2",
"service_name": "Erdem'''s VR-Stream", "service_name": "Erdem'''s VR-Stream",
@@ -115,12 +115,12 @@ def test_producer3(api: TestClient) -> None:
"other": {"action": ["register", "deregister", "delete", "create"]}, "other": {"action": ["register", "deregister", "delete", "create"]},
"entity_did": default_entity_did3, "entity_did": default_entity_did3,
} }
paramter = "producer" paramter = "service"
get_request = "entity_did=" + url.quote(default_entity_did3) get_request = "entity_did=" + url.quote(default_entity_did3)
make_test_post_and_get(api, request_body, paramter, get_request) make_test_post_and_get(api, request_body, paramter, get_request)
def test_producer4(api: TestClient) -> None: def test_service4(api: TestClient) -> None:
request_body = { request_body = {
"uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d3", "uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d3",
"service_name": "Onur'''s gallary", "service_name": "Onur'''s gallary",
@@ -130,12 +130,12 @@ def test_producer4(api: TestClient) -> None:
"other": {"action": ["register", "deregister", "delete", "create"]}, "other": {"action": ["register", "deregister", "delete", "create"]},
"entity_did": default_entity_did4, "entity_did": default_entity_did4,
} }
paramter = "producer" paramter = "service"
get_request = "entity_did=" + url.quote(default_entity_did4) get_request = "entity_did=" + url.quote(default_entity_did4)
make_test_post_and_get(api, request_body, paramter, get_request) make_test_post_and_get(api, request_body, paramter, get_request)
def test_producer5(api: TestClient) -> None: def test_service5(api: TestClient) -> None:
request_body = { request_body = {
"uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d4", "uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d4",
"service_name": "Sara'''s Game-Shop", "service_name": "Sara'''s Game-Shop",
@@ -145,34 +145,34 @@ def test_producer5(api: TestClient) -> None:
"other": {"action": ["register", "deregister", "delete", "create"]}, "other": {"action": ["register", "deregister", "delete", "create"]},
"entity_did": default_entity_did5, "entity_did": default_entity_did5,
} }
paramter = "producer" paramter = "service"
get_request = "entity_did=" + url.quote(default_entity_did5) get_request = "entity_did=" + url.quote(default_entity_did5)
make_test_post_and_get(api, request_body, paramter, get_request) make_test_post_and_get(api, request_body, paramter, get_request)
######################### #########################
# # # #
# Consumer # # client #
# # # #
######################### #########################
def test_consumer(api: TestClient) -> None: def test_client(api: TestClient) -> None:
request_body = { request_body = {
"entity_did": default_entity_did, "entity_did": default_entity_did,
"producer_uuid": "8e285c0c-4e40-430a-a477-26b3b81e30df", "service_uuid": "8e285c0c-4e40-430a-a477-26b3b81e30df",
"other": {"test": "test"}, "other": {"test": "test"},
} }
paramter = "consumer" paramter = "client"
# get_request = "entity_did=did%3Asov%3Atest%3A1234" # get_request = "entity_did=did%3Asov%3Atest%3A1234"
make_test_post_and_get(api, request_body, paramter) make_test_post_and_get(api, request_body, paramter)
def test_consumer2(api: TestClient) -> None: def test_client2(api: TestClient) -> None:
request_body = { request_body = {
"entity_did": default_entity_did2, "entity_did": default_entity_did2,
"producer_uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d4", "service_uuid": "8e285c0c-4e40-430a-a477-26b3b81e30d4",
"other": {"war": "games"}, "other": {"war": "games"},
} }
paramter = "consumer" paramter = "client"
get_request = "entity_did=" + url.quote(default_entity_did2) get_request = "entity_did=" + url.quote(default_entity_did2)
make_test_post_and_get(api, request_body, paramter, get_request) make_test_post_and_get(api, request_body, paramter, get_request)
@@ -271,7 +271,7 @@ def test_entity(api: TestClient) -> None:
"visible": True, "visible": True,
"other": { "other": {
"network": "Carlo1's Home Network", "network": "Carlo1's Home Network",
"roles": ["service repository", "service consumer"], "roles": ["service repository", "service client"],
}, },
} }
paramter = "entity" paramter = "entity"

View File

@@ -25,3 +25,4 @@ Than run this command:
``` ```
GITEA_TOKEN=<YOUR_TOKEN> nix run .#update-ui-assets GITEA_TOKEN=<YOUR_TOKEN> nix run .#update-ui-assets
``` ```
.

View File

@@ -1,5 +1,5 @@
{ fetchzip }: { fetchzip }:
fetchzip { fetchzip {
url = "https://gitea.gchq.icu/api/packages/IoSL/generic/IoSL-service-aware-frontend/15d2rn12jhrwry2ipvjhn62dgl7vvdrkc1zkp02xfvaz8ijf18s8/assets.tar.gz"; url = "https://gitea.gchq.icu/api/packages/IoSL/generic/IoSL-service-aware-frontend/15d2rn12jhrwry2ipvjhn62dgl7vvdrkc1zkp02xfvaz8ijf18s8/assets.tar.gz";
sha256 = "15d2rn12jhrwry2ipvjhn62dgl7vvdrkc1zkp02xfvaz8ijf18s8"; sha256 = "sha256-SKPgZERfbdcFuPMHNnPb+9DXhLFQ7huFzzxDKYLNopU=";
} }