Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 51 - 60 of 564 for Router (0.34 seconds)

  1. cmd/storage-rest-server.go

    //
    // Any updates to this must be serialized via globalLocalDrivesMu (locker)
    var globalLocalSetDrives [][][]StorageAPI
    
    // registerStorageRESTHandlers - register storage rpc router.
    func registerStorageRESTHandlers(router *mux.Router, endpointServerPools EndpointServerPools, gm *grid.Manager) {
    	h := func(f http.HandlerFunc) http.HandlerFunc {
    		return collectInternodeStats(httpTraceHdrs(f))
    	}
    
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Tue May 27 15:19:03 GMT 2025
    - 45.7K bytes
    - Click Count (0)
  2. cmd/test-utils_test.go

    func registerAPIFunctions(muxRouter *mux.Router, objLayer ObjectLayer, apiFunctions ...string) {
    	if len(apiFunctions) == 0 {
    		// Register all api endpoints by default.
    		registerAPIRouter(muxRouter)
    		return
    	}
    	// API Router.
    	apiRouter := muxRouter.PathPrefix(SlashSeparator).Subrouter()
    	// Bucket router.
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 77K bytes
    - Click Count (0)
  3. tests/test_generate_unique_id_function.py

    from inline_snapshot import snapshot
    from pydantic import BaseModel
    
    
    def custom_generate_unique_id(route: APIRoute):
        return f"foo_{route.name}"
    
    
    def custom_generate_unique_id2(route: APIRoute):
        return f"bar_{route.name}"
    
    
    def custom_generate_unique_id3(route: APIRoute):
        return f"baz_{route.name}"
    
    
    class Item(BaseModel):
        name: str
        price: float
    
    
    class Message(BaseModel):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 75K bytes
    - Click Count (0)
  4. docs/tr/docs/tutorial/bigger-applications.md

    `items` submodule’ünü doğrudan import ediyoruz; sadece içindeki `router` değişkenini import etmiyoruz.
    
    Çünkü `users` submodule’ünde de `router` adlı başka bir değişken var.
    
    Eğer şöyle sırayla import etseydik:
    
    ```Python
    from .routers.items import router
    from .routers.users import router
    ```
    
    `users` içindeki `router`, `items` içindeki `router`’ın üstüne yazardı ve ikisini aynı anda kullanamazdık.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 20.3K bytes
    - Click Count (0)
  5. docs/fr/docs/tutorial/bigger-applications.md

    Nous importons le sous-module `items` directement, au lieu d'importer uniquement sa variable `router`.
    
    C'est parce que nous avons également une autre variable nommée `router` dans le sous-module `users`.
    
    Si nous les avions importées l'une après l'autre, comme :
    
    ```Python
    from .routers.items import router
    from .routers.users import router
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 21.4K bytes
    - Click Count (0)
  6. tests/test_include_route.py

    from fastapi.responses import JSONResponse
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    router = APIRouter()
    
    
    @router.route("/items/")
    def read_items(request: Request):
        return JSONResponse({"hello": "world"})
    
    
    app.include_router(router)
    
    client = TestClient(app)
    
    
    def test_sub_router():
        response = client.get("/items/")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Apr 08 04:37:38 GMT 2020
    - 496 bytes
    - Click Count (0)
  7. docs/es/docs/tutorial/bigger-applications.md

    Estamos importando el submódulo `items` directamente, en lugar de importar solo su variable `router`.
    
    Esto se debe a que también tenemos otra variable llamada `router` en el submódulo `users`.
    
    Si hubiéramos importado uno después del otro, como:
    
    ```Python
    from .routers.items import router
    from .routers.users import router
    ```
    
    el `router` de `users` sobrescribiría el de `items` y no podríamos usarlos al mismo tiempo.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 20.2K bytes
    - Click Count (0)
  8. docs/pt/docs/tutorial/bigger-applications.md

    Estamos importando o submódulo `items` diretamente, em vez de importar apenas sua variável `router`.
    
    Isso ocorre porque também temos outra variável chamada `router` no submódulo `users`.
    
    Se tivéssemos importado um após o outro, como:
    
    ```Python
    from .routers.items import router
    from .routers.users import router
    ```
    
    o `router` de `users` sobrescreveria o de `items` e não poderíamos usá-los ao mesmo tempo.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 20.3K bytes
    - Click Count (0)
  9. docs/zh-hant/docs/tutorial/bigger-applications.md

    ///
    
    ### 避免名稱衝突 { #avoid-name-collisions }
    
    我們直接匯入子模組 `items`,而不是只匯入它的變數 `router`。
    
    這是因為在子模組 `users` 中也有另一個名為 `router` 的變數。
    
    如果我們像下面這樣一個接一個匯入:
    
    ```Python
    from .routers.items import router
    from .routers.users import router
    ```
    
    來自 `users` 的 `router` 會覆蓋掉 `items` 的 `router`,我們就無法同時使用兩者。
    
    因此,為了能在同一個檔案中同時使用它們,我們直接匯入子模組:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 18.7K bytes
    - Click Count (0)
  10. tests/test_additional_responses_router.py

        message: str
    
    
    app = FastAPI()
    router = APIRouter()
    
    
    @router.get("/a", responses={501: {"description": "Error 1"}})
    async def a():
        return "a"
    
    
    @router.get(
        "/b",
        responses={
            502: {"description": "Error 2"},
            "4XX": {"description": "Error with range, upper"},
        },
    )
    async def b():
        return "b"
    
    
    @router.get(
        "/c",
        responses={
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 5.6K bytes
    - Click Count (0)
Back to Top