@@ -53,17 +53,17 @@ func (api *OsctrlAPI) GetTag(env, name string) (tags.AdminTag, error) {
5353}
5454
5555// AddTag to add a tag to osctrl
56- func (api * OsctrlAPI ) AddTag (envUUID , name , color , icon , description string , tagType uint ) (types.ApiGenericResponse , error ) {
56+ func (api * OsctrlAPI ) AddTag (env , name , color , icon , description string , tagType uint , custom string ) (types.ApiGenericResponse , error ) {
5757 var r types.ApiGenericResponse
5858 t := types.ApiTagsRequest {
5959 Name : name ,
6060 Description : description ,
6161 Color : color ,
6262 Icon : icon ,
63- EnvUUID : envUUID ,
63+ Env : env ,
6464 TagType : tagType ,
6565 }
66- reqURL := fmt .Sprintf ("%s%s" , api .Configuration .URL , path .Join (APIPath , APITags , envUUID , tags .ActionAdd ))
66+ reqURL := fmt .Sprintf ("%s%s" , api .Configuration .URL , path .Join (APIPath , APITags , env , tags .ActionAdd ))
6767 jsonMessage , err := json .Marshal (t )
6868 if err != nil {
6969 return r , fmt .Errorf ("error marshaling data - %w" , err )
@@ -80,13 +80,13 @@ func (api *OsctrlAPI) AddTag(envUUID, name, color, icon, description string, tag
8080}
8181
8282// DeleteTag to delete a tag from osctrl
83- func (api * OsctrlAPI ) DeleteTag (envUUID , name string ) (types.ApiGenericResponse , error ) {
83+ func (api * OsctrlAPI ) DeleteTag (env , name string ) (types.ApiGenericResponse , error ) {
8484 var r types.ApiGenericResponse
8585 t := types.ApiTagsRequest {
86- Name : name ,
87- EnvUUID : envUUID ,
86+ Name : name ,
87+ Env : env ,
8888 }
89- reqURL := fmt .Sprintf ("%s%s" , api .Configuration .URL , path .Join (APIPath , APITags , envUUID , tags .ActionRemove ))
89+ reqURL := fmt .Sprintf ("%s%s" , api .Configuration .URL , path .Join (APIPath , APITags , env , tags .ActionRemove ))
9090 jsonMessage , err := json .Marshal (t )
9191 if err != nil {
9292 return r , fmt .Errorf ("error marshaling data - %w" , err )
@@ -103,17 +103,18 @@ func (api *OsctrlAPI) DeleteTag(envUUID, name string) (types.ApiGenericResponse,
103103}
104104
105105// EditTag to edit a tag from osctrl
106- func (api * OsctrlAPI ) EditTag (envUUID , name , color , icon , description string , tagType uint ) (types.ApiGenericResponse , error ) {
106+ func (api * OsctrlAPI ) EditTag (env , name , color , icon , description string , tagType uint , custom string ) (types.ApiGenericResponse , error ) {
107107 var r types.ApiGenericResponse
108108 t := types.ApiTagsRequest {
109109 Name : name ,
110110 Description : description ,
111111 Color : color ,
112112 Icon : icon ,
113- EnvUUID : envUUID ,
113+ Env : env ,
114114 TagType : tagType ,
115+ Custom : custom ,
115116 }
116- reqURL := fmt .Sprintf ("%s%s" , api .Configuration .URL , path .Join (APIPath , APITags , envUUID , tags .ActionEdit ))
117+ reqURL := fmt .Sprintf ("%s%s" , api .Configuration .URL , path .Join (APIPath , APITags , env , tags .ActionEdit ))
117118 jsonMessage , err := json .Marshal (t )
118119 if err != nil {
119120 return r , fmt .Errorf ("error marshaling data - %w" , err )
0 commit comments