github.com/rohankumardubey/aresdb@v0.0.2-0.20190517170215-e54e3ca06b9c/api/schema_request.go (about)

     1  //  Copyright (c) 2017-2018 Uber Technologies, Inc.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package api
    16  
    17  import (
    18  	metaCom "github.com/uber/aresdb/metastore/common"
    19  )
    20  
    21  // GetTableRequest represents GetTable request.
    22  // swagger:parameters getTable
    23  type GetTableRequest struct {
    24  	//in: path
    25  	TableName string `path:"table" json:"table"`
    26  }
    27  
    28  // AddTableRequest represents AddTable request.
    29  // swagger:parameters addTable
    30  type AddTableRequest struct {
    31  	// in: body
    32  	Body metaCom.Table `body:""`
    33  }
    34  
    35  // AddColumnRequest represents AddColumn request.
    36  // swagger:parameters addColumn
    37  type AddColumnRequest struct {
    38  	// in: path
    39  	TableName string `path:"table" json:"table"`
    40  	// in: body
    41  	Body struct {
    42  		// swagger:allOf
    43  		metaCom.Column
    44  		AddToArchivingSortOrder bool `json:"addToArchivingSortOrder,omitempty"`
    45  	} `body:""`
    46  }
    47  
    48  // UpdateTableConfigRequest represents UpdateTableConfig request.
    49  // swagger:parameters updateTableConfig
    50  type UpdateTableConfigRequest struct {
    51  	// in: path
    52  	TableName string `path:"table" json:"table"`
    53  	// in: body
    54  	Body metaCom.TableConfig `body:""`
    55  }
    56  
    57  // DeleteTableRequest represents DeleteTable request.
    58  // swagger:parameters deleteTable
    59  type DeleteTableRequest struct {
    60  	// in: path
    61  	TableName string `path:"table" json:"table"`
    62  }
    63  
    64  // DeleteColumnRequest represents DeleteColumn request.
    65  // swagger:parameters deleteColumn
    66  type DeleteColumnRequest struct {
    67  	// in: path
    68  	TableName string `path:"table" json:"table"`
    69  	// in: path
    70  	ColumnName string `path:"column" json:"column"`
    71  }
    72  
    73  // ListEnumCasesRequest represents ListEnumCases request.
    74  // swagger:parameters listEnumCases
    75  type ListEnumCasesRequest struct {
    76  	// in: path
    77  	TableName string `path:"table" json:"table"`
    78  	// in: path
    79  	ColumnName string `path:"column" json:"column"`
    80  }
    81  
    82  // UpdateColumnRequest represents UpdateColumn request.
    83  // Supported for updates:
    84  //   preloadingDays
    85  //   priority
    86  // swagger:parameters updateColumn
    87  type UpdateColumnRequest struct {
    88  	// in: path
    89  	TableName string `path:"table" json:"table"`
    90  	// in: path
    91  	ColumnName string `path:"column" json:"column"`
    92  	// in: body
    93  	Body metaCom.ColumnConfig `body:""`
    94  }
    95  
    96  // AddEnumCaseRequest represents AddEnumCase request.
    97  // swagger:parameters addEnumCase
    98  type AddEnumCaseRequest struct {
    99  	// in: path
   100  	TableName string `path:"table" json:"table"`
   101  	// in: path
   102  	ColumnName string `path:"column" json:"column"`
   103  	// in: body
   104  	Body struct {
   105  		EnumCases []string `json:"enumCases"`
   106  	} `body:""`
   107  }